Vim is a powerful text editor, and in this post, I will convince you to use it. Feared and loved by coders and writers, itβs a controversial text editor, and with good reasons. It has a steep learning curve, but itβs well worth it. In this post, Iβll explain why you should use Vim or Vim key bindings in your favorite IDE.
What is Vim?
Vim is a free and open-source text editor. It was first published in 1991. The name stands for Vi IMproved (vi is a different text editor). It's known for its steep learning curve and how hard it is to exit. As of today, 2.6M people have viewed the question "How do I exit the Vim editor?" on StackOverflow. But don't let this frighten you! (and by the way, it's :wq
to save and exit)
Why You Should Use Vim
Here are four reasons why you should use Vim (or Vim key bindings).
Efficiency
The key bindings. They are optimized for efficiency, so your hands stay where you learned to put them: left hand on asdf
and right hand on jkl
. It offers many shortcuts and forces you to only use the keyboard (that's right, throw away your mouse!). Once you learn the shortcuts, even the basic ones, you'll quickly be more efficient at writing text and code. You can edit text, navigate your document, and execute commands without leaving Vim.
I won't go into details here exactly what key bindings are available. Read on to find out where to learn them.
Vim key bindings are available for all popular IDEs. So you can enjoy all the cool modern features while using Vim's awesome key bindings.
Customizable
Not only does it come with a ton of shortcuts, but you can also create your own! And even your own plugins. There's a big community for plugins. At VimAwesome there are currently ~20k plugins available. And there are many plugin managers to make it easy to manage your plugins.
When Vim starts it reads a configuration file called
.vimrc
. This is where you put your custom shortcuts and load your plugins.
It's Available Everywhere
Vim is available pretty much everywhere. Whether you're using Windows, macOS or a UNIX based distribution, it's there. This makes it convenient to work in environments without graphical user interface (GUI). Such as a Raspberry Pi.
There are even extensions for your favorite browser that adds key bindings.
You Will Feel Awesome
I saved this point for last but it might be the most important one. Using these key bindings will make you feel awesome, I promise. Your coworkers will envy your speed, and your parents will consider you a genuine computer wizard! π§ββοΈ
Now that I've convinced you to use it, let me tell you where you can learn it.
Where to Learn
I recommend you start with vimtutor
. It's an application available in macOS and UNIX based distributions. For Windows, you need to install Vim to get access to it.
Simply type vimtutor
in your terminal to start learning!
Once you learn the basics there's this awesome cheat sheet. And endless tutorials online.
Conclusion
Vim is a powerful text editing application thatβs heavily used by software engineers. There are key binding plugins for all major IDEs, so you can enjoy the cool features of your IDE while still using Vim key bindings. It's highly customizable and its community is very active. Start learning today by typing vimtutor
in your terminal!
Connect with me on Twitter, LinkedIn, or GitHub
Originally published at prplcode.dev
Top comments (6)
Couldn't agree more. Once you start using it, there's no looking back.
After 15+ years of vim I switched to neovim for the built-in language server and never looked back. Recommend trying it.
Neovim definitely interests me. I write my code in IntelliJ usually, but sometimes Vim. Never understood the difference between Neovim vs. Vim but you made me curious to check it out.
Vim rulez on the server! I also use it as an IDE plugin.
Same here! IntelliJ vim plugin works pretty nicely
I agree. I am a NeoVim user and must say that I do feel Awesome and especially love the speed gain.
I think that the buffer splits have spoiled me. :)