Vim and Vigor

April 26, 2025

7 min read

You should learn vim.

Many a novice programmer has experienced the flash of panic that comes when you pull changes in from your remote while you also have local commits. This little dialogue pops up, asking you to enter a commit message to explain the merge.

A terminal window with vim open

The reason this is one of the most universally traumatizing experiences for newbies is a confluence of two things:

  1. the remote needs to have been updated separately from your local repo, which is unlikely to occur while you're hacking around on solo projects as a neophyte. When it finally happens for the first time it's a nasty surprise after you feel like you're finally getting the hang of git.
  2. git's default text editor is vim

It really isn't obvious that what you're looking at right now is vim. The word "vim" isn't visible anywhere, nor are any guidelines for how to use vim. Compare that to the more beginner-friendly nano which at least has a title bar (the BSD version on macOS says "pico" instead of "nano" for some reason) and a list of helpful commands.

A terminal window with nano open

While it's communicated clearly that one must press ^X to quit out of nano (though who can say if the newbie even realizes that ^ represents ctrl!) it's not clear at all how to get out vim. It's led to decades of memes and grousing about this parasitic text editor that takes your terminal hostage and refuses to let it go, as well as one of the most popular stack overflow questions of all time. Since engineers can never be straightforward about anything, and vim is extremely powerful, you'll learn about twelve different ways to quit (I'm a traditional :q! guy myself) by asking that question.

Nevertheless, you'll find that it is vim—not nano or emacs—whose keybindings have made it in some way or another into almost every developer product on the planet. Keybindings that you must explicitly opt into via a "vim mode" because they are so radically different than the way someone expects their keyboard to behave. And it's not like emacs has zero latent developer mindshare either, most moderately experienced unix terminal users at least know ^E and ^A for moving around their command line a little faster (though I have long since remedied this in my own terminal with yet more vim keybindings). But vim remains the default option for layering advanced productivity features onto your IDE or graphical text editor.

Thousands of developer hours have been spent universalizing this specific model of input to help lubricate the interface between user and computer. As anyone who has taken the vim-pill can tell you, it truly is a force multiplier for navigating text (and other surprising things!) completely from your keyboard. So why haven't you learned vim yet?

But why must I do this difficult thing

I can totally empathize with the instinct to recoil away from something like this that is going to seriously decrease your WPM (at first) and force you to rewrite your muscle memory for even simple tasks. I know it's actively painful to throw out decades of habit to embrace some dubiously useful paradigm. In general, that's a pretty good heuristic. You probably shouldn't learn Dvorak just to squeeze out another 50 WPM over Qwerty because you're going to be swimming upstream against a world designed against you. You probably shouldn't learn the new hype AI coding assistant's peculiarities because it'll probably be overtaken and obsoleted by some other hype AI coding assistant in two years. But vim is the Qwerty of developer products. As close as you can get to universal, counting among its peers other perennial technologies like the C programming language and UNIX. This crusty text editor is still being integrated into the shiny new developer products, giving you a lingua franca for moving fast.

But I think it goes a little bit deeper than that. Vim is unique among technologies in that in not only involves learning but somatic exercise. Unlike a new language or framework that merely represents a bundle of concepts that you must familiarize yourself with, vim involves rewiring your patterns of physical actuation. It's basically the closest a keyboard warrior can get to lifting weights.

Here's a perfect microcosm: most devoted vim-heads will remap the Caps Lock key to Escape. You hit Escape a lot in vim to switch between modes, but Caps Lock is nearly useless. It's occupying very valuable real estate right next to your pinky, so by saving those 5cm of finger travel you get compounding speedups. The same sort of opportunities for optimization exist in nearly every action you do while editing text. They all follow the general process of:

  1. Stop reaching for the mouse
  2. Stitch together the vim commands you know to do the operation entirely via the keyboard
  3. Learn the most idiomatic way vim has for doing that specific operation and get in the habit of doing it that way instead
  4. Customize your vim configuration to account for your own favored and common ways of doing things

Each step comes with it's own noticeable speedup until you're literally flying around a document at the speed of thought. It almost makes me want to learn Dvorak just so I can top out at 200wpm instead of 150wpm.

Screenshot of my monkeytype profile, showing I can hit 163wpm with 100% accuracy

Just in case you didn't believe me

The vim attitude is infectious. If you take this stance of self-optimization and apply it elsewhere, you're going to find yourself chomping at the bit to implement automations for your personal workflows, measuring and improving your performance at the gym, learning how to better arrange your home and your habits. The word "vim" is a noun that means "energy or enthusiasm". I have personally experienced how vim can bless you with vim. It taps into the same primal draw to iterative improvement that video games so skillfully exploit. Taking the time to stretch yourself and learn it marks you as an engineer who is going to bring that same energy to your product and your tech stack, squeezing out high-impact improvements by addressing papercuts with DevX and UX in the same way you've used vim to address your own papercuts.

But how can I do this difficult thing

I knew subsistence-level vim all throughout college to facilitate my systems administration duties. There was no other option for GUI text editing while ssh'd into a server. For whatever reason I never really applied myself to it, staying slow and clumsy even as one of my peers started to catch the vim bug and ran circles around me. It took a few more fits and starts throughout my subsequent jobs, always occurring around the time I felt like I was fully familiarized with the product and it was just a bunch of schlep that awaited me. Vim scratched my self-improvement itch. But the mouse was always there, beckoning. Since I was working with the vim keybinds in graphical editors like VSCode and XCode I had plenty of opportunities to revert back to the old way of doing things. The real breakthrough was purchasing myself a nice wireless mechanical keyboard. It felt so good to type on so I wanted to use it all the time, and by placing it some distance away from my laptop's trackpad I was able to make it extremely inconvenient to touch the mouse. Thus began my personal revolution that reshaped the way I use my computer.

Once you get even a little bit familiar with vim, the first thing I recommend is installing a browser extension that gives you vim keybindings while on the web, like Vimium for Chrome/Firefox or Vimlike for Safari. This begins to teach you how comfy—for lack of a better word—it feels to move around web pages without moving off of your keyboard. This will hopefully send you down a rabbit hole of learning key commands for all of your various apps, like using option-arrow to scan through channels in Slack, or cmd-K to jump to a channel in Discord, or cmd-L to jump to the address bar in Safari. You can turn on keyboard navigation in accessibility settings and start highlighting elements by tabbing through them. And of course, rev up the vim mappings in VSCode, XCode, Warp, and more to start getting your reps in. Simply unplug your mouse and make it work with just your keyboard.

I'm still only intermediate at vim. Some people go really crazy with macros and config twiddling and plugins and the wacky wild world of Neovim which we'll just ignore for now. Raycast is another great app for aspiring keyboardists. It can be the gateway drug to more scripting and automation, hopefully resulting in you brushing up on your bash and OS skillz. Maybe you'll even start ricing.

Whatever you do, I hope you can see the value in a craftsman's approach to computer use. If you're going to spend so many hours of each day of your pitifully short life seated in front of this machine, you might as well make them pleasant and devoted to self-cultivation.