SB

5 Reasons to learn VIM

In 2023, everybody is talking about learning how to use generative AI to write code. While this is relevant as well, I propose to learn VIM instead. Vim is a terminal-based editor developers worldwide use to edit and create their code. It’s known for its different modes allowing users to edit documents quickly without using a mouse. In addition, it’s lightweight and open-source, which makes it popular within the open-source and Linux community. I learned to use Vim two years ago and have used it ever since. In more detail, I use the vim extension in VS Code. This extension might not give the entirety of the Vim functionality, but it’s perfect for my use case. For people who want to experience VIM to its maximum, check out vim or its more modern variant NeoVim.

P.S. If you read this guide and were looking for how to quit vim? It’s :wq

Faster development

Photo by Marc-Olivier Jodoin on Unsplash

Using your mouse takes only a little time, but that time adds up. VIM has tons of tools for easy navigation between words, letters and lines. Want to move to the end of a line, use $. Need to replace four words, c4w. The system that vim uses is straightforward once you understand how it works. With these fast movements, you will quickly impress your non-vim peers. However, be careful not to remove your entire document!

This fast movement also integrates copy-pasting, using “*y can be used to copy the selected item into the clipboard. Alt-tab into your browser and use it to search for answers. Copy a helpful snippet and paste it with “*p! This faster development is not exclusive to the VIM, which brings me to my next point.

Keybindings in other programs

The VIM community has their influence all across the software industry. Many other programs use VIM key bindings in their program. This makes scrolling pdfs in a program, such as Zathura, as easy as navigating with VIM. Moreover, people in the community have created programs to do anything with VIM keybindings. I used Vim Vixen for a while, which makes scrolling the browser with VIM possible. The community of VIM is a powerful one and one of its strong points.

Customisable

In its raw form, it is just a text editor, like notepad on windows. For development, this is not the most useful to use. Luckily, the community has a rich library of plugins that can be used to customise the behaviour and look of VIM. I prefer to use VS Code (yes, I’m a heretic), but VIM customisations are on another level. You can also copy people’s configurations since there is a default format, namely .vimrc. This also makes it easy to copy your configurations across devices.

AAA

Photo by Ilya Pavlov on Unsplash

VIM is (almost) always available. Sometimes, you have to work on a headless server or embedded device. You ssh into it and want to edit some code or configs; how do you do this with just a terminal? The answer is obviously VIM (or its older variant, vi)! Most Unix-based devices have it installed by default. If it’s not installed, it’s also easy to install through a package manager.

Fun

Finally, VIM is also fun to learn. Though some things make it look like a torture device connected to a keyboard, it will be challenging for a few days. You will find ways to do specific tasks through VIM on different fora and Youtube videos. Moreover, there is also a game you can play to learn VIM, namely vim adventures.

Then I have one more thing left to say, and that is:

LEARN VIM RIGHT NOW!!!!!!

Disclaimer: the views posted on this website are my own and are not representative of BCG or any other entity.
Back