Why I’m Relearning Vim in 2023

My first experience learning Vim was during my sophomore year of university in an introductory C programming course. The instructor recommended we try Emacs or Vim as two solid command-line text editor options. After briefly tinkering with both editors, I quickly realized I had a strong affinity for Vim. It just felt right.

During that course, I wrote all my C programs at the command line with Vim using PuTTY to SSH into my school lab machine. Programming had never before been more enjoyable. That class significantly boosted my programming skills, and I believe this was in no small part due to my learning Vim.

However, during the summer of my sophomore year, I switched keyboard layouts from Qwerty to the Programmer Dvorak layout. I spent that entire summer learning to touch type with my new keyboard layout. By the time classes began again in the fall, I had completely forgotten how to use Vim. Enjoying the newfound freedom provided by Programmer Dvorak, I switched to GUI-based editors and never looked back. Until just recently…

Rely on the vernacular, not muscle memory.

The main reason I forgot Vim so quickly was the overreliance on rote memorization of different keys, and how that affected the text I was editing. Therefore, when the underlying key locations changed (i.e., j is now pressed by the middle finger on my left hand, while it was previously pressed by the index finger on my right), I completely forgot the Vim command syntax and vocabulary.

Instead of using rote memorization, you can obtain a deeper Vim understanding by learning the Vim vernacular. You do this by thinking of j as pointing down, to remember that it moves the cursor down one space. Or remember cw as change word, instead of a finger pattern or sequence of keystrokes. With this method of learning Vim, even if (or when!) your keyboard layout changes, you will remain proficient in Vim.

Vim is still the most efficient way to edit text.

Another reason to come back to Vim, even in 2023, is that it’s still one of the most efficient available options to edit text. While sophisticated editors like Visual Studio Code (VS Code) have come a long way, there’s still no great replacement for Vim. Furthermore, because Vim has stood the test of time, it is now widely available as an add-on in many applications. For example, I can natively use Vim in Joplin and VS Code via an extension, and in web-based code editors such as on LeetCode. Because of Vim’s widespread adoption, learning Vim today has an even higher payoff. You can use it almost anywhere (there is even a Vim Chrome extension).

This is the Vim sweet spot.

One of the best introductions to Vim is to open a terminal and type vimtutor. From there, you may be tempted to open a file with vim file_name and be on your way. However, given Vim’s widespread adoption, that may not be the most efficient usage of Vim for you. I achieve the best developer quality of life when I combine my Vim usage with a modern code editor. In my case, that would be VS Code.

This allows usage of some of my favorite VS Code commands, such as command + p to search files by name or command + d for multiple cursor select. Combining VS Code and Vim commands allows for very fluid editing. For example, I may use Vim commands to navigate to the start of a word, then select that word (and the subsequent words that I care about) with VS Code’s command + d, then use Vim’s c to change those occurrences to a new word. There are many such useful combinations and you shoud take advantage of them, given how robust modern code editors have become.

Learn Vim in 2023.

All developers and computer power users could benefit from learning Vim in 2023. Because of its mnemonic-based vernacular and widespread support, Vim is more approachable than ever. Additionally, whether you are a developer spending your days in VS Code or working in another modern text editor, take advantage of the ability to combine Vim with the power of these other applications for a truly seamless typing experience.

Will you decide to learn Vim in 2023?

  • EricOP says:

    For a very entertaining and thoughtful take on VIM and it’s pros and cons see https://www.youtube.com/watch?v=dIjKJjzRX_E (What editor do you use? – FunFunFunction #31)

  • Join the conversation

    Your email address will not be published. Required fields are marked *