Wednesday, September 28, 2005

Why vi ?

Because vi remains my favourite editor. Its USP (modal editting) is such a good idea that you wonder why it is still the only editor that uses it.

The opposite, you have to use key combinations (control keys) in order to do commands, is so pervasive these days that it even infects those apps which have no text-entry.

OK, OK! It is unusual, and may take a bit of getting used to, and I do have the advantage of decades of getting used to it, but nonetheless it seems such an advantage over mousey editors, and monstrosities like emacs (well of course I'd be anti-emacs :) which force you to use 11 fingers where 1 would do.

And once you get used to a few single keystroke commands, it becomes very easy to string a few together to gain a macro language for free. Oh for the simple efficacy of the single dot in any other editor .

And, it's always available ! No installation required on any flavour of Unix, and available for any flavour of anything. Of course all the preferences are held in text files, so dual-booters can hold one set of preferences for many OSes. (Indeed, for many users, on many machines, all linked back to one preference file).

But that's not really why vi is good enough to get into the blog's title. The reason for that is: I kinda realised last night that vi has always been (for me) a good example of what Open Source is about - you get the source so you can change it. One of the reasons my vimrc is so accessible is that I have so many changes, and it's always a wrench on a new machine when I'm back to plain-vanilla vi!

Because the macro language is just a simple extension of letter-commands, it is easy to change any script you may acquire. Vi does have another, "official" macro-language, but it's always possible to add on the simple letter commands on top of that.

Again there are caveats - I'm a professional programmer, so it is "easy" for me, but I don't think this is enough - I do not regularly re-engineer any of the other tools I use daily. My current job has me engineering the internet, so Firefox is a daily tool. Firefox is Open Source, and has macro-language, but I do not regularly re-script Firefox. Not ever in fact.

OTOH - Firefox is a bad example for various reasons (which are left as an exercise for the reader), but I just noticed something else: I write as if expecting replies. That's definitely a consequence of years on Usenet and email lists. Hell's bells, it's not as if anyone is ever going to read this.

So they may never find out that python (but only 2.3, grrrrr..) is built into the back of vi. Took me years to find this, because, well, who needs it ? We've already got the informal macro language, and the official one. Turns out that the Bicycle Repair Man needs it, and refactoring is the beginning of PI.

Hey - one can't link to "PI", meaning Programming Intelligence, anywhere. Hah, wait till they get a load of me.

New terminolgy - "Non-existing" nowadays means "Does not turn up in google". Google is 7 years old today. I may live in interesting times after all.

0 Comments:

Post a Comment

<< Home