Passionate About Vim
I first encountered Vi on a Solaris training course and I couldn’t believe how bad it was. And not just bad but mean. I felt that Vi was out to make things difficult just for me (a wonderful mix of self-pity and egotism there!).
The instructor explained that Vi had been developed for use over narrow bandwidth connections and the commands were designed to be as economical as possible with keystrokes — sort of like a Huffman code for editing text. And this was why one had to type, somewhat cryptically,
:wq to save and quit.
It reminded me of my first encounter with Emacs in the university engineering department. With nobody around to ask and no visible documentation, it took me 20 minutes to quit it. (In fact I didn’t manage to; I got so frustrated that I logged off and hoped that it would go away before I returned the next day.)
Eventually I learned enough Emacs to to write a dissertation in LaTeX, but I never felt strongly about Emacs. It was ok. Since then I have developed a grudging respect for Emacs: any software using Lisp for configuration has a certain warped genius.
Fast forward a few years and I was coding for one of Europe’s largest hedge funds. We had Windows boxes and used TextPad. This was a huge step forward as far as I was concerned: syntax highlighting, regular expressions, customisable behaviour, etc. TextPad is still the editor I recommend to those on Windows, though newcomer e looks promising.
After a few months though, I realised my right thumb was sore from constantly using the cursor keys to move around. I knew I would either have to change the way I edited text or endure RSI. And so I started looking for a new text editor: one that wouldn’t use cursor keys to move around; one that would let me keep my hands on the home keys as much as possible and would minimise awkward key combinations. And, while we’re at it, one that would work on Windows (for our development boxes) and Linux (our production servers). I read Seven Habits of Effective Text Editing and it made perfect sense.
My search led me to Vim. Oh no.
Vim is Vi improved. It doesn’t make you use cursor keys to move around — instead hjkl for left, down, up and right — it minimises the number of awkward key combinations, unlike Emacs, and it’s cross-platform.
So I reneged on my promise never to touch Vi or its ilk again and installed Vim.
It was slow progress. In terms of learning curve I would rank Vim with windsurfing. Each step takes a lot of perseverance but, after a few weeks and months of practice, you start flying along. No more sore thumb and much higher productivity. Yay! I no longer hated it.
And then one day I opened up Vim and realised, to my surprise, that I thought it was wonderful. It had gone from being the only software I hated to more or less the only software I loved.
I think this is what Kathy Sierra is getting at when she talks about avoiding the zone of mediocrity. Vim is certainly not mediocre and I love it.