How to Learn Vim Without Going Insane Part 1
The first part of this two part blog post will go over how to best introduce yourself to Vim. I’ll begin this blog post with a few caveats. Firstly, I am by no means an expert with Vim and am still learning new things everyday, which is actually pretty awesome. Secondly, this blog post will not explain all of the power that Vim allows a user to wield. That being said my goal of this post is to explain what finally worked for me to get productive with Vim and also some things I wish I had done differently. Like many people reading this Vim was not my first text editor, but I had always heard a lot about how powerful it was and also how much of learning curve it has. I’d attempted to transition to Vim on more than a half dozen occasions and always ended unproductive and frustrated. Finally after looking a many blog posts I came up with a game plan to finally enter the world of Vim and become productive with it as my text editor.
A great first step is to visit Vim Adventures. Vim Adventures is a fantastic in browser game that goes over the basics of movement and editing within Vim. If you’re more of a MUD kind of person and prefer to learn through reading and doing, I would also recommend checking out VimTutor. VimTutor is a program built into unix systems. To access it simply open up your terminal and type vimtutor
. The program will walk you through the basic movements and editing.
Now that you have an understanding of the basics, you might think the next logical step would be to open up vim and start using it. Nope! While Vim Adventures and VimTutor are great programs for getting started with Vim, spending an hour playing a game or going through a tutorial will hardly cement Vim’s movements to muscle memory. It was at this point that I had a minor epiphany on the best way to learn Vim; stick with what you’re familiar with. Before switching exclusively to Vim, my text editor of choice was Sublime Text. During my reading of vim tutorials I came across a post that mentioned Sublime Text had a vim like mode called Vintage-Mode. My next step to become competent using Vim was to actually not use Vim, but use a text editor I was already familiar with in Vim mode. This allowed me to stay in my comfort zone, while simultaneously building my Vim muscle memory. Other editors such as Atom also have a similar Vim mode. Work on projects with this method until the basic movements taught in the tutorials is second nature.
In the next post I’ll go over actually diving into using Vim itself as well as how to customize Vim. Happy coding.