Why You Should Use Vim
There is a lot of debate among programmers on which one is the best text editor. One of the huge holy wars is Vim vs Emacs. I am not going to compare them in this post, I will just state some advantages using Vim than using other popular text editor like Sublime Text 3 or Visual Code. There are a lot of arguments in this lists I am gonna state, but everyone has the right to say their opinion, right? Here we go.
Vim is Ergonomics
A lot of newbies that want to learn Vim scared about the key commands. I think that is normal, movement arrows is hjkl
in Vim, after all. that alone makes a lot of difference. But I tell you this: Vim’s key commands designed for minimal hand movement.
Try this: Put your hands in the home row (fingers in asdf jkl;
). This is the natural stance of your hand when typing, right? and notice where does the Vim’s movement’s key? You just need to move 1 key to the left from jkl;
to hjkl
instead of moving your goddamn hand to reach the arrows. And some people even (god forbid) move their hand away from keyboard to reach their goddamn mouse just to do some movement.
There are a lot of stress put into your hand when typing from just moving alone. For example when using common text editor, beside of arrows you can use PgDn, PgUp, Home, End, a lot of Ctrl to move a lot. But this is bad, many people think the exhaustion after typing is normal, but it is because they didn’t know there are better alternatives: Vim.
This is why I support this Vim’s weird key command. Sure it is very different from the usual key command on most text editors, but it makes your hand stay in the home row as much as possible. When you already got used to the key commands, you can move faster than light (exaggeration, really).
Vim is Fast
You will save a lot of time once you get used to Vim’s navigation key and shortcuts. You’ll almost never take your fingers off the home row while coding. Most people would think that using mouse is quick and efficient, but if you use Vim it is a hindrance. That’s how fast Vim is, even using mouse is seen as a hindrance and you will be faster if you use Vim’s navigation key.
Vim also has Macros. You might argue that other text editor such as Sublime Text has it too. But Vim see every key as command, so deleting paragraph, deleting words, changing inside parentheses, moving to the end of the line, is a key. This makes creating complicated macros easier because you can chain commands. This means you can create complicated macros that did complex stuff with ease.
Vim is Everywhere
Whenever you work on someone’s machine, or when you SSH’d to some random machine, or even those weird router thingy that use UNIX environment, I can guarantee you they have Vim (or at least Vi) Available.
The benefit of this is you don’t have to download 100-300 MB files then spent 30 minutes to install and configure the text editor / IDE. Just pick up the machine then boom you already got your Vim.
Vim is Light
There are a lot of people amazed when they are using Visual Studio because it is blazing fast. Usually those people are comparing Visual Studio to IDEs, of course it is fast. But they didn’t know the real fast yet.
I am not saying Vim is the fastest text editor, but terminal editors definitely faster than GUI one, because they doesn’t need to load the graphical component first. Just… Baam!, like that. Vim started instantaneously, no need to wait 30s waiting the program to opens.
Here and here are some benchmarking on several popular text editors.
Vim is Customizable
When you think about the term customizable, you maybe meant the usual configuration on text editors. Well, Vim has more beyond that. You can create your own shortcuts and even customize the built-in shortcut. You can change how it looks and how it behave. And there are many plugins available for you to use. This is one of the thing why I like Vim, I can customize it to whatever I like.