Almost 30 years have passed since the first version of Vim appeared, but it continues to develop and grow its community. Many projects, such as Neovim, MacVim, etc., were inspired by Vim, which can also be integrated into an IDE or code editor, like Webstorm or VS Code.
I will not compare Vim with other IDEs or code editors because it makes no sense. In return, I will briefly show you the Vim ecosystem. We will look into ways to use it, and you will understand how you can start using it without struggling and fighting with the editor.
This article is for people who know little about Vim, but it is still useful for experienced users.
Vim and Neovim
Currently, two main varieties exist: Vim and its fork, Neovim. Most plugins extending the editor are available in both, so you can choose whatever you prefer.
Earlier, an obvious advantage of Neovim was asynchrony, but modern versions of Vim, starting with version 8, support async I/O. I prefer Neovim, mostly because it has a constantly developing community, plugins better support Neovim than Vim, and actually, it looks much better by default.
Ways to use
Let’s focus on a few ways of using Vim. I will describe the ways I tried myself, and I believe you can find more if you want to.
The first way of using vim is very simple. You can install it and use it in the terminal, just run vim
or nvim
command to open the editor. In my opinion, it’s not the best way for beginners, and at the start of the Vim journey, it’s better to use it in your favorite code editor or IDE.
The following approach is to use Vim with VsCode. If you use it, just install the Vim plugin. The easymotion plugin will be automatically installed to make you happy. For me, it’s the most important Vim plugin, which significantly increases your coding speed.
You can also integrate Vim with JetBrains IDEs using 2 plugins:
SpaceVim is a ready—to—use configuration that also provides an interface for configuring the editor and installing plugins. A similar project, Spacemacs, exists on the Internet, which they were inspired by.
It’s a good solution for people who want to try using an editor in the terminal but are too busy to configure Vim from scratch.
If you want to fully immerse yourself in Vim, you can try the Vimium extension. With its help, you can use the browser through Vim.
I only tried the extension for Chrome, but there is Vimium for other browsers.
It’s not the most helpful thing, but it’s worth checking out, and maybe you’ll like it. I didn’t like it personally, but I hope it will be helpful for you.
The most convenient option for a beginner is to integrate Vim and Easymotion into your current editor or IDE, which will be much more convenient than Vim in the terminal.
However, it is unlikely that you will be able to use Vim at work immediately, so it is better to enable it only when you want to learn how to use it and integrate it into your daily work step by step.
Getting Started
To start working with the editor, you should first learn to navigate and learn Vim modes; there should be no difficulties here. After that, you can try writing simple functions and expressions in your favorite programming language just to get used to it.
Then, you can move on to mastering combinations and commands. The most effective way is to learn a few each day. I mean, try them hands-on and use them later. There is much information about this, so I don’t see the point of stopping here.
I will separately emphasize the importance of touch typing. Without it, it is impossible to work fully and comfortably with Vim.
Learning touch typing is not a very pleasant activity and takes quite a lot of time. But if you devote 20–30 minutes a day to it, then in a month, you will be able to type blindly, albeit slowly and with errors.
First, remember the keys’ location and learn to press them without looking at the keyboard. Next, print simple texts. For beginners, the main thing is not speed but quality, so you should ignore the number of characters per minute.
When you feel comfortable, you can practice speed. I think it is optimal to reach 100–120 characters per minute. Then the excitement starts, and you want to speed up more and more. There is much information about correct finger placement on the internet for those just beginning to learn how to type unthinkingly. I will focus on resources where you can improve your skills:
These are beneficial sites. Here, you can increase your speed and reduce the number of errors. In principle, you can learn touch typing while getting to know the combinations in Vim, but it will be more difficult.
After all, the keyboard is your work tool, so touch typing is still worth learning.
Resources
There are many Vim resources on the internet, especially for beginners. One of the best, in my opinion, is vim.fandom.com/wiki/Vim_Tips_Wiki. It is suitable for those familiar with the ecosystem and can at least navigate the editor and use its modes. This site has a lot of material on various editor combinations, commands, and settings. There are also tutorials dedicated to specific aspects of Vim.
Another good site about the editor is wikibooks.org/wiki/Vim. I haven’t used it much, but it’s also worth checking out.
Also, catch some interesting Twitter feeds I read:
I think this information will be enough to understand the editor’s advantages, both separately in the terminal and in connection with popular code editors and IDEs.
I want to emphasize that patience and persistence are key to getting to know Vim (as in learning anything new).
Top comments (0)