For the past few months I’ve been using vim as my main editor and I am very glad that I have made the switch. This is after having tried it out for short periods many times over the past few years. Vim is not famous for being easy to start with. So here are some resources I used to help me learn vim.

Vimtutor

I began by spending a few hours every day practicing vim. I started with the vimtutor tutorial that comes with vim which covers the basics. If you have vim installed, simply run vimtutor to get started with it. As I went along a created a cheatsheet of various key combinations which I would look at whenever I was practicing vim. Not everyone uses vim the same way so I highly recommend that you make your own custom cheatsheet of the various key combinations and commands that you find useful and are likely to use in your workflow.

Vim adventures

vimadventures screenshot

Vim adventures is a browser-based game to help you learn vim. The first level is free, after that it costs $25 for 6 months of access. I completed the first level which took around 15 minutes. The game looks like an excellent resource.

Vim golf

vimgolf screenshot

Vim golf is a website where the goal is to make edits to a piece of text in as little keystrokes as possible. You install the vimgolf program on your machine, visit the vimgolf.com website and find a challenge that is appealing to you. You are able to view other users solutions and as you submit better solutions which use lower numbers of keystrokes you will unlock more solutions from other members.

I spent a bit of time each day completing the challenges and found it very useful to learn the “flow” of vim and commit the key combinations to muscle memory. I would use my cheat sheet when doing the challenges. I still occasionally use this website whenever I have 5 minutes to kill.

.vimrc

vimrc screenshot

Vim is highly customizable and there are many different plugins and configuration options. When you are getting started with vim, it is easy to start adding lots of plugins. I would not recommend this, the stock version of vim comes with all the functionality you need and it is worth the effort to learn it. However stock vim does ship with some not-ideal default settings, so I would recommend taking a look at other vim users’ vimrc files and using it as your base vimrc which you will modify, or copying out sections that appeal to you. My vimrc can be found here.

Conclusion

I spent around two weeks intensely practicing vim using these various resources, and customizing my vimrc to my liking. After this two week period I made the switch to using vim for all of my editing. I was still much slower than not using vim, and occasionally I had to switch back to VSCode, but after a month I became just as fast with vim as a normal editor.