Why Every Developer Must Use Vim
Why use Vim?
To save time.
We use various plugins as well as snippets to minimise keystrokes. Vim is a champion at it. I don't think I need to tell how frustrating it is to switch between typing on keyboard and using mouse while programming. Once you learn to use Vim, you won't go back to any other text editor.
Isn't learning to use Vim hard?
Learning to use Vim is same as learning touch typing. It isn't hard. It just takes some time to train your muscle memory. At most, it would take you a week to learn enough commands to be able to navigate comfortably.
Do I need to remember hundreds of Vim commands?
Vim commands are rule based. To perform a certain task, there are many combination of commands but you don't need to remember each one of those. You just need to pick your favourite way of doing it.
Is saving time the only benefit of using Vim?
Of course not.
I wrote the single most important reason to use Vim. I didn't want to choke the introductory paragraph with a myriad of advantages of using it. If you are still not convinced then please do a simple Google search on the benefits of using Vim.
There must be some catch. It can't be that simple.
In my experience, you will face two major hurdles:
- Finding a tutorial that will guide you to learn Vim from zero to mastery.
- Configuring your
.vimrcfile. This is a configuration file for Vim. All your Vim settings go here.
.vimrc file is not that tough at first but when you start exploring plugins (which is a must) and their settings, you will end up in a deep hole of configuration mesh. Each developer has curated his/her
.vimrc file in months, if not years.
How do I start using Vim?
As far as tutorials are concerned, there are two very good one.
I would say, go through the 'Vim Masterclass' course first. It's a series of video tutorials and then dive straight into the contents of 'Learn Vim the smart way'.
Aren't YouTube tutorials good?
They are but they won't guide you systematically. You need a certain path to ace and the aforementioned tutorials have done a terrific job at that.
- Explore Neovim.
- Learn how to use Vim/Neovim with tmux.
- Install 'Neo Vim' plugin by Alexey (for VSC lovers). Please don't use the popular Vim plugin.
- Last but not least, there's a Vim plugin for everything you need. Use a plugin manager like vim-plug (my favourite) to install and explore various Vim plugins.
All the best!