←back to thread

538 points todsacerdoti | 2 comments | | HN request time: 0.001s | source
Show context
robenkleene ◴[] No.44358285[source]
I love this, I've been iterating on workflows like this for something like a decade now. Over time I've tried to peel back as many of my custom layers as possible, because all of those layers have a maintenance cost.

Stock Vim (without `tmux`) can actually do most of what's shared in this post with `rg --vimgrep restore_tool | vim -c cb -` (`vim -c cb -` is my favorite feature in Vim; I find it strange that it's so rarely used or talked about).

(Since re-running the `rg` search can be undesirable, and I often like to analyze results in a terminal before opening them in Vim. I use a custom `tmux` command to copy the output of the last command [using this trick that involves adding a Unicode character to your prompt https://ianthehenry.com/posts/tmux-copy-last-command/], then I send that into Vim with e.g., `tmux saveb - | vim -c cb -`.)

replies(7): >>44358653 #>>44358736 #>>44360925 #>>44362611 #>>44363893 #>>44364510 #>>44403351 #
msgodel ◴[] No.44358736[source]
Ten years ago I threw out my massive multi-file, multi-package vim config and have been slowly building up a much simpler vimrc about 1-2 lines a year. I completely agree, defaults in old software are almost always there for a reason and you should try to understand that before changing them.
replies(6): >>44359927 #>>44360624 #>>44361137 #>>44362231 #>>44363110 #>>44363602 #
eviks ◴[] No.44363110[source]
That would be true if you had universally great designers back then, which wasn't the case, thus the defaults are universally bad, so it's a bad heuristic to stick to them and force a waste in trying to understand them.

For example, why is the default vim cursor hjkl? Well, it's just that the arrows on the physical keyboard of one of the vim designers were drawn there. That's it. There is no deep thought in search of the best cursor position, and understanding the why is just learning a useless piece of trivia.

replies(5): >>44363298 #>>44363634 #>>44363864 #>>44364112 #>>44364424 #
notarobot123 ◴[] No.44364112[source]
> defaults in old software are almost always there for a reason

Keeping your fingers on the home row is great design for keyboard-first navigation.

All software design is historically contingent so you do have a point but assuming that old design = bad design is just wrong. Some things haven't changed.

replies(1): >>44364267 #
eviks ◴[] No.44364267[source]
> Keeping your fingers on the home row is great design for keyboard-first navigation.

Except you've just made that reason up since vim's defaults don't follow this logic. For example, the most frequent commands of going back/forward by word are not on the home row, they follow a different principle of name-based mnemonics.

Strictly speaking, this isn't even true for hjkl, that was due to the fact that arrows were drawn there, not because the designer followed some good design principles (granted, at least the physical arrows were likely driven by that principle, though there is still a mistery of moving off resting/home keys, which might be related to the fact that cutoff ASCII H code is backspace https://news.ycombinator.com/item?id=3684763).

> Some things haven't changed.

Indeed, and that universal fundamental thing that hasn't changed is that a few random people doing design blindly can't universally create a world of good design!

replies(2): >>44364764 #>>44365093 #
SirHumphrey ◴[] No.44365093[source]
Yes, they are not in the resting position on the home row, but they are close enough for a command you will be executing often. Crating a key-map is an optimization problem between memorability and ergonomics.

Vim command layout is not perfect, the worst offender in my opinion is $ (move cursor to the end of the line), which is commonly needed, but somewhat hard to reach.

HOWEVER - when you start to use an surviving piece of still used old software, a bit of humility goes a long way. Not because software or designers were necessarily better in the past, but the reason that the software is still in use is probably because there are some benefits to it. So learn the defaults first, modify later when you understand them.

replies(1): >>44365172 #
eviks ◴[] No.44365172[source]
> they are close enough for a command you will be executing often

Right, just like w/b are "close enough" outside the home row completely

> but the reason that the software is still in use is probably because there are some benefits to it.

You forgot to connect this principle to this discussion. How does it make the defaults good to support your faulty conclusion that you need to learn them first?

replies(2): >>44365726 #>>44367345 #
ddingus ◴[] No.44367345[source]
That is absolutely not a faulty conclusion in any objective sense!

Now, you get to say it is faulty, and when one thinks about it for a minute, that idea packs a whole lot less punch.

Just want to dilute some unnecessary implied authority out of this otherwise interesting discussion.

Frankly, I always learn the defaults for the high value idea of reducing my overall configuration and maintenance workload!

Secondly, when I communicate workload to others, I don't have to do as much because the defaults are in place and useful.

These days, I tend to run defaults everywhere I can. Doing this means I do not have to a ton of configuration when setting up new environments.

I have also found those defaults do make a lot of sense. Maybe not the absolute peak sense, but more than enough.

I end up able to move and do a lot very reasonably quickly.

I also find my skills do not need to refresh as often too.

In any case there is plenty of room to disagree here, sans the idea of someone's conclusion being " faulty.

replies(1): >>44367985 #
1. eviks ◴[] No.44367985[source]
> and when one thinks about it for a minute

... one still can't correct the fault. You haven't answered the question of the original disconnect in arguments.

Your new arguments aren't relevant either since they're also NOT connected to the original re. bad defaults. You can have bad defaults that aren't there for any good reason and still think that reducing maintenance is more valuable! Fine, but that's a different argument!

replies(1): >>44369367 #
2. ddingus ◴[] No.44369367[source]
I am not sure we are always talking about bad defaults.

That needs evaluation, and that need to be done in context.

In many cases, the defaults are not bad. One finds that out by working with them.

Really, I just don't feel "faulty" makes any sense.

If anything, it is more establishing a baseline.

Whether someone bothers with defeats first is debatable. I am on the work with them first side for what should be obvious reasons.

Passersby can arrive at their own conclusions and life carries on.

Re: still think reducing config and maintenance...

Yup. I have shown it many times. This also depends on context. For most of my career, no brainer.