Sunday, November 16, 2008

Editor wars

Of course it's the usual Vim vs. Emacs stuff. Some time ago I thought I had left Vim for good. But. There's a comment somewhere on the net along the lines of "Use Vim and Emacs. Vim is the better text editor, Emacs is the better programmable environment." So, what the hell, I picked up O'Reillys "Learning the vi and Vim Editors", and after three or four days I have to say, that comment was right on the spot.

As we all know, they both have their strengths and weaknesses. Also, I haven't been in business long enough to be sure, but IMHO the (not so?) friendly competition between the editors seem to lead to a very similar feature-set for the end-user (that is, me). (X)HTML+CSS+JavaScript+PHP+XSL+Whatnot is, for example, better suited for Vim, due to the awkwardness of multiple major modes in Emacs. Mumamo is great most of the time. OTOH, I still haven't seen anything resembling the LaTeX preview mode of Emacs in Vim (that might be just my ignorance though).

Conkeror and Vimperator

Talk about similar feature-sets... Not part of the editors proper, but both the Vim and Emacs crowds have created a Firefox plugin (later stand-alone browser in the case of Conkeror), that fit their philosophies and the bindings of their favorite editor. Apart from some differences (Conkeror uses the XULRunner backend) they're really pretty similar - and also, quite perfect, me has to add :) They fit perfectly into WMII. What I like the most is that they both have an "It's all text"-like behavior with their respective text editor. (21/02/2009: which can be overridden. I use Vimperator with Emacs as the external editor.)

Point is, you don't have to choose one over the other. Sure, both Emacs and Vim have a rather steep learning curve (that isn't so steep looking back, but still). But they aren't so steep as to limit you to either one. It's the classical example of the hammer-and-nails problem - just use the one that fits the job. Or, if you like, the one that doesn't hurt. I love Emacs, but nxhtml-mumamo just made me want to cry at times. Nope, I ain't biased, this is just my experience :)

Update 21/02/2009: I've been using Nxhtml-mumamo since originally publishing the post, and my opinion has changed. It's actually quite really good at what it does. Also, about using Vim and Emacs: there's viper-mode in Emacs, that lets you use vi-like keybindings for moving and editing inside Emacs - very useful. Vimpulse, although apparently abandoned at the moment, adds some nice Vim features.

Links (in no particular order)

Emacs home
Vim home
Vimperator
Conkeror

No comments:

Post a Comment