:q!

This post is more than 12 years old.

Posted at 07:00 on 29 September 2011

For those of you who don’t understand the title, it is vim-speak for “Forget this, I quit.” As of this week, I am no longer a vim user. I have uninstalled it from both my home and work computers and do not intend to pursue it any further. After over four years as a casual vim user, and a handful of failed attempts to take it further than that, I can safely say that attempting to become a serious vimmer is the most pointless exercise in futility that I have ever attempted, a complete distraction, and a vortex that sucks you into unreality.

I was first introduced to vim about four and a half years ago by a couple of friends who run a local two-guys-in-a-garage IT consultancy, who questioned my geek credentials on the grounds that I’d never used it, and dismissed me as a wuss because I preferred to use nano when I had to ssh into Linux servers. More out of curiosity than anything else, I got hold of a vim cheat sheet and started having a play with it, and I’ve ended up using it as standard in Linux ssh sessions nowadays.

More recently, I started trying to use it on Windows. In theory, it sounded like a good idea — stop relying on IntelliSense, and commit your APIs to memory — but I’ve found that in practice, while it’s nice and handy for quick-and-dirty edits to single files such as my hosts file, when it comes to more serious use — trying to make extensive edits to a .NET project, for instance — it rapidly starts to feel like an exercise in futility, and I’m usually back to Visual Studio and Resharper with their IntelliSense phrasebooks before you can type :wq.

Let’s take a fairly simple operation. You have a dozen or so lines of code that you want to move from one place to another. In theory, it’s quite simple in vim. You put your cursor on the first line and type 12dd. You then move to where you want to put it, and press p. Only how do you know it’s 12dd and not 13dd? You have to count the number of lines first. Great. Let’s press j-j-j-j-j, counting all the time until we get to the bottom, then type 13k to get back to the top, only to discover that we’ve mis-counted. Vim fanboys tell me that you can be much more fluent once you know how to use it, but this doesn’t seem particularly fluent to me.

I recently came across a screencast of someone using vim to do some fairly complex cleanup of a Microsoft Word document by running the raw XML through various regexes and macros. It all looks pretty clever and all that, but it makes me ask, why are you using a text editor at all for that in the first place? That kind of thing is the job of a scripting language such as sed, Perl or Python, simply because you should be saving it to disk for later re-use.

Of course, there’s a massive learning curve, and they also tell me you also need to customise it heavily before you can see any benefits, but they say it’s worth it. I dunno. Maybe you will see some benefits, but on the other hand, maybe you won’t. Or maybe you will think you do but you won’t have any metrics from “before” to compare it against. Certainly, it seems to me like a lot of effort for something where YMMV, and it all looks particularly pointless when there are more modern alternatives out there that are far more intuitive, easier to use, and every bit as powerful. In the meantime, not having reached that point of fluency, vim still feels to me very much like trying to edit code with Notepad. Or, as my colleague Ashic Mahtab said on Twitter, it “seems like Resharper for Notepad.”