Why Should I Listen To You?
Fragmented observations of a fractured lifestyle.
May 10, 2008 Heresy

A great deal can be gleaned about the culture of the computer hacker1 that after what language to write programs in, the most virulent arguments to be had are around which editor to use. These arguments usually centre around whether to use vi or emacs.

I have mostly ignored the controversy over the years, at least at work. I used the editor supplied with the platform (VMS edit) or the compiler (Intel aedit) for most of my early career, then started using the editors supplied with the IDE I was saddled with for that week (Microsoft development environments before they became bloated and slow; JBuilder briefly and disastrously; Eclipse most successfully).

At home I have used a mishmash of different editing tools - microEmacs on my Archimedes, a tool called PFE on Windows that I still use for its printing features - but about ten years I settled on vim for three reasons:

1. it worked the same on every platform I used (my fingers were tired of changing which keys to press for different functions depending on the machine I was sitting at)
2. it used journalling so I wouldn't lose edits even in a power failure (I had lost a full day's work in just this way)
3. it was modal, that is the meaning of a key press varied depending on whether you were in text entry mode or command mode (the editor I had been most productive with was aedit which was also modal)

I've been happy with vim for most of the last decade. I have used it to edit text, source code, and web pages on every machine I work on.

However, I have lately become dissatisfied. I have been considering emacs.

Now, emacs is a weird editor by the standards of any normal human being. So is vim for that matter, but its weirdness is perhaps explicable. But still I find myself drawn to the other side of the great religious divide.

Well, there are two main ones: vim isn't powerful enough, and vim doesn't support Lisp very well.

To be sure, vim is powerful. I am lost in editors without regular expression support, for example, and its list of features is ever growing (and not fully understood by your author). But it is not, and has never been intended to be, very scriptable. The "global application" command is great, but you can't chain them together to isolate a smaller subset for application. It is not obvious how to save a common search/replace sequence in a named command.

And vim does have some support for Lisp. It obviously has a Lisp syntax mode, and there is some navigation support too, but all the really cool Lisp integration has been done within emacs.

So I am going to start using emacs. It will be interesting to see whether my distantly remembered microEmacs key commands will surface from the distant past.

[1] by which I mean "enthusiastic programmer" rather than "vandal".

Posted by Dunx at May 10, 2008 10:19 PM
Comments