You have probably heard of Vim.
Once, there was a study that related the drop in IQ of programmers to the use of the mouse since it was introduced back in the 1960s. Legend has it that a group of elite programmers embarked on the journey of creating the perfect text editor. This text editor was called Vim, and it was so powerful that it could be used to write code without ever touching the mouse. In this way, the balance between regular users and cretins was again restored.
Since then, Vim has been capturing programmers to its cult, being nowadays the technology with more active prophets around the world. My guess is that you have probably encountered one: that guy at work with a custom mechanical keyboard with the Dvorak layout.
And you are still, most certainly, wondering why anyone would use Vim.
But, really, why would anyone use Vim? You already have VSCode, with your 50 to 100 extensions that make your life easier. Vim, on the other hand, has a very weird set of key bindings, and the learning curve is very steep, and it runs in the terminal... Everyone is afraid of the terminal...
In this article, I will explain the main advantages of using Vim, or, I should say, NeoVim, and if it suits you or not. In advance, and although it hurts me a little bit, NeoVim is not for everyone.
Using NeoVim has many advantages. I very much like how fast and lightweight it is. I really enjoy using the terminal. I love my highly customizable, minimalistic NeoVim setup. However, in my opinion, there are two main advantages.
Vim is a modal editor. This means that it has different modes in which you can edit text, and not only one like the rest of the text editors.
Vim motions are the key bindings that let you move around the cursor in normal mode and select text in visual mode. Vim motions are the main reason why Vim-lovers love Vim so much. Every imaginable thing that you can do to edit text has its own key binding: move up, down, left, move one word to the left... select a word, select text until a character... copy, paste, delete... navigate to a specific line, move lines up, down, to the end of the file, to the end of a line... find concurrences, change all concurrences... Everything is possible, and if the key binding is too long, just create a remap and make it your own. And don't let me start with macros...
Vim's key bindings are just another level of editing text. At the beginning, it might have been overwhelming, but now that I have gotten used to it, I cannot imagine editing text without these motions.
NeoVim is not a plug-and-play editor. You can always copy-paste some config file or use a pre-configured NeoVim distribution, but that would be missing the point, in my opinion.
In order to have a good NeoVim setup, you have to install a plugin manager, then install the syntax highlighter, the auto-completion, the theme, the file finder... Moreover, to build and run your applications, you will need to use the terminal.
This is not trivial for most of the people, but if you have that curiosity about learning how things work behind the curtain, I assure you that you will learn a lot about how the tools around programming languages work. That curiosity will make you stand out, for sure.
To know if NeoVim is for you or not, simply ask yourself these questions:
If your answer is No/No, it means that you are happy enough using your cursor to edit your text and that you just want to hit the green triangle to run your code. And there is nothing to be ashamed of.
If your answer is Yes/No, you really don't need to use NeoVim for Vim motions. For most IDEs there is a NeoVim extension that enables Vim motions, so you can start learning and using them for your text editing.
If your answer is No/Yes, you probably are an Emacs enthusiast, and I don't know how you ended up here.
If your answer is Yes/Yes, welcome to the club. And remember, the first rule of the NeoVim Club is to always talk about NeoVim.