4 ms·
Being able to do more with your text editor is one reason to learn vim, and it's the theme I see over and over in these "learn vim" posts. But it's also respon
by sevensor 9y ago
Being able to do more with your text editor is one reason to learn vim, and it's the theme I see over and over in these "learn vim" posts. But it's also responsible for the idea that, in the words of the article, "learning vim is a lot of work." It's just not true that learning vim is a lot of work -- learning to do a lot of things with vim is a lot of work. But basic hjkl navigation, switching between normal and insert mode with i and ESC, saving and exiting with :w and :q, deleting text with x and dw, these take a day to learn, tops. Learning the basics pays off right away, but it doesn't pay off in terms of being able to use advanced features. There's an alternative reason to learn vim that I never see anybody mention.
Vim allows you to think less about your text editor. Once the basic editing commands become automatic, vim puts the least friction between your brain and your text. No mouse, no arrow keys, your fingers mostly don't stray from the home row. (Especially if you learn to use ^[ for ESC.) It's as big a gain as learning to touch-type. The productive insights accumulate with time. It really doesn't matter to the beginner that dw composes a command and a motion. It deletes to the start of the next word, and that's enough for now. The idea that you don't actually know vim if you don't understand its grammar is ridiculous. It's like saying that kids can't speak English because they haven't learned how to diagram a sentence.
The whole "learning vim is super-productive but super-hard" narrative is just condescending ego-stroking from people who already know how to use it. I suspect it's actually discouraging people from learning vim, which isn't actually very hard. Half a dozen commands, and one crucial concept -- normal mode -- and you're off to the races.
- icc97 9y agoIt is super hard because everything you're used to from your regular editor or browser commands don't apply. So all your muscle memory is useless. That might sound like it's easy to overcome but it's not and it's super frustrating until you get out of one groove into the other.
- sevensor 9y agoI think a huge reason people find this difficult is that it's being presented alongside a whole bunch of other ideas. Even the fairly minimalistic vimtutor goes off the rails after lesson 1. Most of the stuff in that tutorial could wait until you've been using vim for a month or longer. Learn the movement keys, learn to enter and exit insert mode, learn to delete text, and learn to save and quit. Trying to learn that and at the same time trying to learn about how commands are composed of actions and motions, or how to use plugins, or buffers, or regex, or anything else, is going to cause you to stumble over the basics.