The Value of Vim

Quill Cronwall
3 min readNov 29, 2021

--

As a beginning programmer you are given vague advice on how to start learning: pick a language and stick to it — it doesn’t matter what you choose. I disagree. It matters the utmost what programming language you start your coding journey with, and that language should be Vim.

Vim logo

Vim is a text editor released in 1991 by Bram Moolenaar. It takes its name (Vi iMproved) from vi, a text editor created for the UNIX operating system in 1976. While not technically a programming language, using Vim involves layering key commands in a grammar that can be thought of as a language of navigating, editing, and saving any text document — in other words: Vim is the language of speed and precision that can be applied to any programming task.

A beginning programmer will spend more time staring blankly at error messages than typing at first, but as they progress greater amounts of time will be spent changing a single variable name across an entire file, or adding forgotten semicolons to line after line of code. Having shortcuts to breeze through these mundane actions with Vim allows students to spend more time learning and less time typing.

Vim is everywhere

Vim’s origins in UNIX have entrenched the editor in modern operating systems: macOS and most Linux distributions have Vim included out of the box. Seriously. You can see for yourself if you open a new terminal on on either of these operating systems and enter the command vimtutor (The best way to start learning Vim by the way).

Vim is everywhere and yet most users’ first encounter with the program ends in smashing their keyboards in frustration. After googling “How to quit Vim” and typing “:q” most users have their first and last encounter with Vim, never realizing the time-saving power the editor has .

What makes Vim powerful?

Vim can be used without a mouse. Think about that for a second. Every moment that a programmer’s hands are away from the keyboard, companies are losing out on potential productivity.

When you need to jump down to line 2000 in a file, a few keystrokes in Vim will take you there instantly. Jump to any character in a line with the “f” command. Instantly change the contents of a string with the “c”command. A great place to dip your toes into the world of Vim commands is this cheat sheet.

Vim macros make repetitive and tedious tasks easy. Adding country codes to a list of 10,000 phone numbers or commas to a collection of thousands of addresses can be accomplished by running a vim macro. An in-depth guide on Vim macros can be found here.

Vim is customizable. Everything from the color scheme to the key bindings can be changed. Many vim users will remap the CAPS lock key for better ergonomics (reaching all the way to the ESC key a few hundred times a day gets a bit cumbersome after a while).

Vim is a transferable skill with any programming language, framework, or project. Most modern IDEs have officially supported plugins that extend the core functionality of Vim with extra key bindings. Even programming-based educational sites like Leetcode for have options to edit code using Vim in a web browser.

Learning Vim

At the end of the day a software engineer’s job is to edit text files. Learning Vim makes that job easier. There are great resources for learning vim after completing vimtutor. Vim adventures is great for visual learners, openvim is great for learning by doing, and the Vim plugin for Visual Studio Code is a great way to start using vim within the comfort of your editor. Happy Hacking!

--

--