Hackernoon logo6 reasons why you should learn Vim by@x_vi_r

6 reasons why you should learn Vim

Author profile picture

@x_vi_rXavier Coiffard

Source of the photo

1 — It’s fast & Lightweight

Vim is one of the lightest text editor, it can be run in any *nix terminal. I’m agree with you, we don’t really care about booting time, we don’t care about the space it takes on the hard drives either. 
But lightweight also means it can be run everywhere. On your dev machine, on your server, on your raspberry Pi etc… And THIS is a huge plus, same environment for code/browse logs/configure web-servers. You only need a terminal (through ssh or not) you clone few dotfiles and you’re home!

2 — It’s everywhere

Vim is one of the most popular text editor for the last 40 years, so it has been implemented everywhere. Your IDE probably embed a “Vim mode”, you can also use the Vim shortcut in search engines there is even a Vim mode in Emacs! … Because the community around Vim is huge, once you know how Vim works you can migrated all your computer-based work on it.

3 — It’s ergonomic

Yeah OK, it’s everywhere, but what the point about it? 
My main answer is probably ergonomic. As a coder, I spend 10 hours a day with my fingers on a keyboard. And, years after years, you have to have some good habits or it will hurt! 
Vim has been think to keep your fingers on the median row (asdfghjkl). There is (almost) no Ctrl + … or Alt + …. One key for one action, less combination as possible. 
So OK, it’s kind of hard to learn, there is dozen of shortcuts to remember, but once you know them it’s very hard to go back in the Ctrl + whatever world!

4 — It’s modal

Wait, how can you use your keyboard keys as a shortcuts if you type on it? It’s called “modal editor” meaning your keyboard is not acting the same way if you’re in insert mode or in normal mode.
Let me explain a bit this point. In insert mode, your keyboard is “normal” you type it writes. But if you escape the insert mode (by typing Esc) then you are no longer able to write anything down but you can interact with the text below your cursor.
w will move the cursor to the next world, r will replace the letter by the next you type, u wil cancel the last edit etc… 
That’s because of this “Modal” paradigm that you can find a lot of jokes about escaping vim.

So yeah, it’s hard to learn — you’ll have to do it 10 shortcuts by 10 — but it’s VERY powerful

5 — It’s modern & multi-language

Vim is first a real powerful way to handle/write text. But it’s also very powerful, it can basically do whatever function you can find on the latest text editor (Atom, Sublime). A lot of them are native — coloration, tabs, split, spell checking
But as an old opensource project there is also a lot of plugins made by the community. Every language has his Vim community with their plugins to lint the code, validate the syntax, compile the code and more !
You can even do more than text editor in Vim it support natively ssh tunneling, embed terminal etc…

6— It’s free (like in freedom)

Last but not least, Vim is an opensource project. It means you can extend it, create new components, share it, and help to build Vim even better! Because, every part of this amazing software has been built by the community, for decades a lot of people have worked to create the better text editor ever, why not use it?


The Noonification banner

Subscribe to get your daily round-up of top tech stories!