←back to thread

539 points todsacerdoti | 1 comments | | HN request time: 0s | 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 #
sakjur ◴[] No.44363298{3}[source]
That seems quite harsh. Just because the designers aren’t perfect doesn’t mean the design is universally bad.

To address your example: Why were the arrow keys on those particular keys? Who put them there? hjkl are on the home row, and touch typists end up having the movement keys under their right hand’s resting fingers. That’s suddenly quite convenient.

replies(3): >>44363377 #>>44363972 #>>44365532 #
1. eviks ◴[] No.44363377{4}[source]
> and touch typists end up having the movement keys under their right hand’s resting fingers.

This is false, h isn't in the resting place. So go back and spend more time trying to explain that historic tidbid of design before trying to defend it (I'd also be curious to know why they shifted left instead of using resting places)!

Or don't and use this obvious principle directly and change keybinds to jkl;

Or go with the muscle memory of inverted T and use ijkl

But whatever you do, prioritizing the original design is a common bad heuristic because there is no reason to think that the original designer was great (not perfect!, don't twist it), so trying to understand the original reasons is a waste of "productivity" time (but if you're curious, it's not a waste of regular time)