Skip to main content
Post Made Community Wiki
Source Link
Karl Bielefeldt
  • 148.4k
  • 38
  • 284
  • 483

Aside from a little bit of BASIC as a kid, I learned programming on Unix. The Unix philosophy is to have many smaller tools that interoperate, but that each focus on doing one job and doing it well. Hence, it feels natural to me to have separate software for editing, compiling, source control, and debugging. Interestingly, IDEs are "integrated," but you still can't fit all that functionality into one window all at once, so you end up with things like perspectives, where you are essentially switching modes between those different tasks anyway, albeit with some overlap.

I could turn it around and ask why people tolerate painfully slow non-vim editing. The best way I can describe the feeling of watching someone edit code that way is that it feels like when you get stuck behind a car going 10 mph too slow because he's on the phone, or like watching a relatively fast hunt-and-peck typist. They're going fast enough to get the job done, but at the same time slow enough to be maddening.

A lot of people say they spend most of their time thinking anyway, so a little bit faster editing doesn't make much difference. In that case, typing is an interruption, and a few extra seconds of editing can make the difference between keeping your train of thought or having to regain it. Also, if you're a long-time touch typist, you know that your fingers type common words without you even consciously thinking which keys to hit. When you're a long-time vim user, that kind of fluidity comes for things like moving lines and words around. In the time it takes to say "delete" in "delete those 2 lines" my fingers have already done it and my concentration is completely unbroken.

Vim is also extremely customizable, and your installed plugins and vimrc evolve as your work evolves. When something starts getting in your way, you look up a better way to do it, and incorporate that into your configuration or commonly used commands. I learned vi in 1993, and still make customizations when my needs change. Just this week I changed my tab filename completion to work more like bash's, because my workflow changed to do a lot more of that recently and the default behavior was getting on my nerves.

Also, I disagree about it not being worth the time to learn. It took way longer for me to learn to touch type than to feel productive in vi, for a similar boost in code editing speed, but you don't see programmers complaining about how long it took to learn to touch type. And you can learn at your own speed and add new commands to your repertoire as you have the inclination. If you start out with set im in your vimrc (stands for insertmode, but I affectionately call it idiotmode for when a colleague needs to type at my desk), you might not even realize you're using vim at all!