To Vim

I see that Apple has updated its word-pro­cessor Pages again. The new ver­sion has some sweet fea­tures, but if you open a doc­u­ment cre­ated in the pre­vi­ous ver­sion, you will be asked if you wish to upgrade the file format. On click­ing ‘yes’, the pre­vi­ous ver­sion of Pages will nev­er again be able to open the file.

That, in itself, is not a prob­lem. But, let’s say, you don’t upgrade your ver­sion of Pages imme­di­ately. Let’s say you wait until the ver­sion after that. Will that ver­sion open the files you have right now? Possibly not.

When a file format is updated, you get new fea­tures. I under­stand that and I applaud. But there are dis­ad­vant­ages. Once you’ve been writ­ing for a few years, and you look back for your floppy, your ClarisWorks files, or even your Kindwords files, you real­ise that file format change is the krypton­ite of lon­get­iv­ity.

Check out this art­icle by Charles Stross on Microsoft Word, entitled ‘Why Microsoft Word Must Die’. Now, we all hate Word, don’t we? Come on. You do.

I hate Word from a pos­i­tion of some expert­ise, because, back in 2003–2005, I used it to write my PhD thes­is. That was a single doc­u­ment con­tain­ing mul­tiple con­tents tables (some for chapters, sure, but oth­ers for psy­cho­lin­guist­ic examples), cross-ref­er­ences, a bib­li­o­graphy, and a great deal besides. I learned the hell out of that pro­gram. Thus did I learn to hate it. It is buggy, poorly designed, and over-fea­tured.

Going back to the point made by Charles Stross, it is a real shame that the pub­lish­ing industry relies on Word as its work­horse.

Stross men­tioned anoth­er pro­gram that he some­times uses. It is called vim. I also use it.

Format Wars: A New Hope

Back in 1976, the year I was born, Bill Joy wrote a text edit­or for UNIX. That edit­or was called vi. It was designed to work over a com­puter ter­min­al (i.e. a text-based inter­act­ive inter­face). It had two modes. In the first mode, whatever the user typed would be entered as text in the cur­rent doc­u­ment. In the second mode, the key­board became a way of nav­ig­at­ing around the doc­u­ment. You can read more about the pro­gram over at Wikipedia.

The pro­gram was updated by Bram Moolenaar for the Commodore Amiga, a com­puter I used as a kid. Moolenaar called his pro­gram vim. This stood for ‘Vi improved’. The year was 1991.

What’s It Like Using Vim?

Where I grew up, we often bought fruit from the vil­lage shop. The apples didn’t come from China or South America. They tasted good, but were a bit small and occa­sion­ally bruised. Later, we bought fruit from super­mar­kets. They were nev­er bruised and they all looked the same. Didn’t taste as good, but by then I’d for­got­ten what non-super­mar­ket apples tasted like. Nowadays I eat ponsy ‘organ­ic’ apples, and they tend to come from Kent, where I live. They’re smal­ler, more bruised, but the taste real.

Where am I going with this? Is Vim some kind of home-grown product? No, it’s American.

Is it tasti­er than Microsoft Word or Apple Pages?

Well.

It’s like this. When you write in Vim, it doesn’t pre­tend that you’re look­ing at a book. It’s text. The notion of ‘present­a­tion’ is off the table. Layout can take a run­ning jump.

Vim presents you with the text at a much sim­pler level.

If you—by which I mean ‘me’—write a story in Word, or Pages, and print that bad boy out, the product you hold in your hand is some­what disin­genu­ous. It mas­quer­ades as a fin­ished product. The imper­fec­tions and short­falls of your prose are very slightly obscured by the lay­out and present­a­tion, both of which are telling you, uncon­sciously, that the work is already like the work you see in books.

To Vim (verb): To remove super­fi­cial present­a­tion in order to reveal sub­stance.

Example: ‘We were lar­ging it at the Time Piece last week until the last tune, Get Lucky. Then the main lights came on, the music turned off, and the boun­cers moved in. The place was totally vimmed.’

Every imper­fec­tion jumps out. It’s just you, your eye­balls, and your text.

Stop Being So Arty-Farty. What Is It Actually Like To Use?

Vim is Fast

When you’re typ­ing text into the com­mand line, the com­puter is not ren­der­ing graph­ic­al gub­bins. Letters appear slightly faster. Not so much faster that you notice it in Vim, but fast enough to notice that text ren­der­ing is slower in most oth­er places, not­ably Word and Pages.

Vim as a Learning Curve

Vim has key­board short­cuts for:

  • Deleting sen­tences
  • Moving the caret to the start/beginning of a sen­tence
  • Moving x words for­ward or back
  • Jumping to the top of the doc­u­ment, to the bot­tom, to the middle, and so on

These take time to learn. I’m still learn­ing them. But, even after a few minutes, it becomes much faster to nav­ig­ate a doc­u­ment using the key­board than using the mouse.

Rock-solid

Vim is used by a lot of geeks (mostly for pro­gram­ming). I’ve nev­er encountered a bug or had it crash.

How Do I Start?

Every jour­ney starts with a single jump, grasshop­per. From Engadget, VIM 101: a quick-and-dirty guide to our favor­ite free file edit­or.

Happy vimming.

vim