Zero to productive in two days in vim

Written on 27 Feb 2016 and tagged Vim, Editor, Environment improvement

Three days ago I decided to make the switch to VIM. After seeing more than a few programmers I admire use it, at conferences, screencasts (of conferences), meetups and in books, I decided it was time to give it a try.

This is not going to be a listing of why you should switch to VIM. There are plenty of, quite frankly, better programmers who can do that in to much more detail than I could ever do at this moment in time. Instead, I will write about how to get going and be productive quickly.

See, the thing that held me from investing this effort into learning VIM before, was that I quite often read that the learning curve was too steep to get productive quickly. I don’t find that to be the case at all. And I think you won’t, too.

So after this little introduction, I write shortly of mindset, then my “method”, the plugins I use to help me gain confidence and then the resources I’ve found useful.

Mindset

First, watch this. Mike Coutermarsh explains the first steps he thinks are essential to learning vim within a week.

My summary of the talk is: people no smarter than you use VIM to be more productive - certainly don’t assume it to be some magical editor, the keystrokes are made to be intuitive, don’t worry about things that seem ‘complicated’ now, it can do everything your current editor can do, and stick to making consistent steps - learn something every week.

He also shows how the keystoke combinations are built up and how they are made to be intuitive. Just say the action out loud and you will know where to go. Have a look.

Learning VIM in a week

Method

I agree with Mike in that it was best for me to try VIM in a no-performance environment. I can image the stress of trying to deliver on a deadline while working with VIM will increase the pressure to immediately understand the keystoke combinations that at this moment will seem complex (really, that’s gonna go really really fast).

The first step for me was to follow the vimtutor tutorial, on mac it’s already installed, just type vimtutor in your terminal. It’s supposedly 30minutes but that was certainly not true for me. I did about 4 chapters after which I started working with vim outside of the tutorial. I made sure to work with each of the commands in different files just to test how it worked and to build the mechanism of navigating files, opening and closing tabs and finally installing plugins.

Just do a few chapters per day, making sure to repeat the motions from the day before. I only spent about 3 hours playing with VIM on the first day. Then I felt I was starting to skim subjects covered in the tutorial so it was time to stop.

My problem was that without a 'project’, I didn’t have enough push to keep discovering into the unknown. And work was not that project. So I decided to rebuild this blog (it’s ruby / middleman) using VIM. I have enough experience to be able to fully mentally 'map’ and navigate the project. Meaning I knew fairly well what to do and where to put things.

This means I exposed myself to a diverse range of actions, which I now had to solve using VIM. This made it more of a puzzle than a chore and from that point on it became much easier.

So I have a how-to-acquire-new-vim-skills mechanism, consisting of a vim-skills-resource (vimtutor & google) and a push-for-improvement-of-vim-skills (the project to complete). After starting with few exercises I needed a means to remember the different actions I had discovered (unfortunately my brain didn’t accept just knowing/remembering everything in one go). So: easy solution. Grab a piece of paper and write down the command(s) you want to remember, after you looked it up. A nice and neat table of vim-commands. It helps me remember the commands themselves by having to very consciously write them down plus makes a neat little resource for when you start forgetting commands. I still use this reference sheet now, as I append this message to this post, 10 days after the original writing.

Then some edge conditions: another important thing was that I set to absolutely in no-case use a different editor. This turned out to be not even necessary. Whenever you run into an issue, just google it, perhaps adjust your dotfiles (if you watched the video you now understand those are your very-easily adjustable vim config files) and continue with life.

Also, learn how to theme your VIM. Make it fun to browse through files. I use a theme called VIM Seti.

Plugins

Resources


© Glenn Jones, 2016   Back to homepage