- Published on
Should I use Vim?
- Authors
- Name
- Talha Tahir
- linkedin @thetalhatahir
We have all seen the meme.
A person goes into panic mode, trying to exit Vim, but alas, all their efforts are futile. They give up, close the command prompt window, and contemplate whether they are even a programmer if they cannot even exit Vim.
But there are times when you meet someone who cannot stop talking about all the cool features Vim can do, and how they have become so much more productive since they started using it. This makes you wonder, Should I use Vim?
The simple answer to this question is Yes and No. Let me explain it from my own experience as a Programmer switching from an IDE to Vim and then back to an IDE.
The Vim Attraction
As a programmer, I had always been intrigued by Vim. Its reputation preceded it – a highly customizable, efficient, and text-based editor with a steep learning curve. The whole idea of accomplishing tasks with just a few keystrokes seemed enticing. As they say, once you master Vim, there is no way you will want to ever use an IDE.
With much enthusiasm, I decided to give Vim a try. Specifically, NeoVim is a community-supported forked version of Vim with many more features than the actual Vim. The initial days were very challenging; setting up everything felt like building my custom PC. From syntax highlighting and color themes to showing the directory tree and adding a terminal, all required setting up. To be honest, the programmer in me was frustrated that all these things are available in any IDE by default.
The Vim Power
Once I got over the basics, Vim started to grow on me. I finally understood why Vim enthusiasts cannot stop talking about it. The minimal interface, the key bindings, the macros, and the quick editing – it all made sense.
And then I quit Vim, why?
As much as I can talk about the good things, there are some things that I could not get over. I would like to mention them point by point.
Visual Cues
As it's essentially an editor and not an IDE, it gets hard to get any sort of visual feedback on what you are doing, whether it's successful or not. The lack of visual cues also makes it hard for a Vim user to discover its new features. You would have to scour through good online articles on Vim just to discover a new command. This is something that you cannot change about Vim as it's just an editor.
Steep Learning Curve
Although I was always intrigued by Vim, I was able to spend the time it took to learn its basics. However, I can fully comprehend that a newbie will never invest this much time. The learning curve is very steep, and on top of that, as I said, the lack of visual cues makes it even harder for anyone trying to learn Vim. You constantly have to refer to good Vim articles, and at times, a simple keybinding requires you to read a how-to and edit Vim's code to achieve it.
Goodbye Mouse
Vim essentially relies on the keyboard, so it has no mouse bindings. While you can enable it with a plugin, it's still not as naive as it is in an IDE. Unlearning the mouse is hard, and it would be easy for someone who is also not using the mouse in their regular work, but for others, it's hard. You constantly reach towards the mouse at times. In this modern era where laptops have very advanced trackpads and the mouse cursor can do a lot of things, it's hard to let go of this basic necessity.
Collaboration Unfriendliness
Vim's unique style of editing and viewing code makes it less collaboration-friendly with other IDEs. At times when you have to pair a program with a developer who uses an IDE, you might find that it can become cumbersome without a standardized editor.
Not Debug-friendly
Vim is excellent for fixing small use cases or writing new software, but it lacks in-editor debugging. Yes, with plugins you can achieve it, but they are not as good as what an IDE provides. This makes Vim a poor choice when you are faced with a tough debugging problem where you have more than 20 breakpoints.
Plugin Dependency
This was a major one for me. The Vim community has a lot of plugins that you can use to make Vim feel like an IDE. But the more plugins you add, the slower Vim gets (Yes, it gets slower!). Furthermore, the chances of plugins conflicting with each other are huge, and then you spend more time reading articles on how to fix the conflict between plugin A and plugin B.
Furthermore, you are never satisfied with the number of plugins you have; you always want another one, something that can reduce your keystrokes or give your editor more visual appeal.
The Vim config Dilemma
Another major reason for me to quit using Vim. The Vim config is a file where you add and remove configurations like adding plugins, adding keybindings, setting up themes, and other sorts of macros you want to trigger. Once you get a hang of it, you are never satisfied. I can refer to articles where people have spent more time configuring their Vim configs and less time on actual work.
This started happening to me too; I started to achieve that perfect Vim config that makes me code with just a few keystrokes. And once you feel you have the perfect Vim config ready, you just add a new plugin and Boom! Everything conflicts with each other, and now you have to remove the conflicts.
Should I use Vim?
You should know how to use it, the basics because it's the default text editor available on the server. You should use Vim if your day-to-day job as a programmer is more about reviewing stuff and less about debugging complex things. One thing that made me a better programmer by using Vim is keybindings; I imported all of them to my IDE, and that is one thing that Vim indeed is great at. In the modern era, it's hard to code without visual cues and getting feedback from the UI; it makes it much more intuitive.
Vim is from a time when all such things were not present, so by default, it lacks all of them. You should accept it the way it is, but if you plan on adding a plethora of plugins to make it feel like an IDE, then it's better to use an IDE instead.