Federico Gambarino

To Vim or not to Vim

September 11, 2020
Vim, VS Code

When, years ago, I started working as an IT Consultant I had to develop and modify scripts that were executed on UNIX servers. I had not the chance to work with many fancy tools. Basically Notepad++ when writing locally on my machine, and PuTTY or FileZilla to reach the remote servers. Then, on the servers, the “fearsome” Vi or Vim were installed. So I started using Vim as well, and the first thing I had to learn was “how to exit Vim”.

Vim has a steep learning curve. At that time I learnt just a few basic commands, the ones that were fundamental to work and then as soon as I had the chance to move to something else I did it. But Vim has also great pontential, if you know how to use it. I remember that my boss could use it quite well, and he was very proficient at it. Sure it’s difficult and you need to grind it to start seeing improvements, but the effort is well paid.

Some days ago, in a tweet, I discovered the existence of this site: vimforvscode.com. I thought: “Wow, learning Vim and using inside VS Code? 10\$ it’s a price worth a try”. I installed the VS Code extension: VSCodeVim and then started the lessons I bought from the site. The exercises aren’t difficult and let you, through practice and hints, learn 22 basic commands.

Of course the lessons of vimforvscode.com aren’t enough to fully master Vim, I suggest you to try and practice a lot, trying to gradually add more commands. These resources can be useful:

  1. Barbarian meets coding is a wonderful site (the home page is something amazing, I suggest you - even if not interested in Vim - to take a look to it!) that among other things explains how to use VSCodeVim, there is a free book, that you can read online, with all the features of Vim in VS Code, and if you need just a quick recap you can use the cheat sheet
  2. Vim Cheat sheet is a complete Vim cheat sheet, but even if there are a few commands that are not supported in the VS Code extension there are others that in the “barbarian” cheat sheet are absent.
  3. Vim adventures is a very nice game that can teach you Vim: it’s very entertaining, first 3 levels are free, then you have to buy a personal 25 dollars license. I just tried till level 3, but if all levels are similar to the free ones, I think it is worth the price!

And so I’m back on Vim, in VS Code now. I have to admit that at the beginning I was feeling quite slow, but, day after day, I feel that I’m improving and that possibly I will be more efficient than before in the near future.
I think that using Vim in VS Code may be a “strange” experience if you are not used to it, but with a bit of effort and a lot of practice can be really satisfying!

...and that's it for today! Thank you for your time 😃


© 2022, Federico Gambarino - All Rights Reserved

Made with ❤️ with Gatsby