I’m known to use the GNU Emacs text editor, which me some criticism, largely from Vi and Vim users, of which there are many at CSE.

Why does everyone use Vim?

I’d hazard a guess that it’s a somewhat self-perpetuating cycle of first-year tutors and lecturers who have never seen anything else used competently, and succumb to the electric meat.

I have taken to loudly advocating the use of nano and gedit as teaching demonstration tools for first-year students, especially those of first computing courses (1911/1917/1511), over a lecturer’s or a tutor’s preferred editor.

And then, of course, it becomes someone else’s problem to introduce editors like Emacs or Vi… but, by that stage, students who know what they’re doing have already picked an editor, and students who don’t will be able to think for themselves.

Why do I use Emacs, then?

I like being always able to insert text, and to be able to use the range of keyboard modifier keys to manipulate the text I write; I find the Vi notion of ‘modes’ to be counter-intuitive, simply because I have the modifier keys. I also like that those modifiers are pervasive throughout Emacs: not only while editing text, but while interacting with the range of tools within the environment that leverage Emacs, including calculators, directory editors, mail and news readers, personal information managers, organisational tools, terminal emulators, IRC clients, web browsers, shells, and more. I use many of these routinely.

Key bindings, and the commands they bind to, are orthogonal, which is a very nice concept. With commands like backward-word bound to M-b, you can readily (and correctly) guess that the opposite binds to M-f and called forward-word. And there’s online help if you forget (in C-h), and easy command execution (via M-x). The scheme is simple and easy to remember, and on the rare occasions I have to run a command by its full name, it’s easy to guess what it is.

The presence of those key bindings in other places, like all of OS X, or in nearly all *nix shells by default, or in the popular readline library, makes it extremely appealing to learn Emacs bindings, and several Vim users I know routinely use Emacs line-editing commands in their shells without realising their origin in Emacs. I’ve used Emacs continuously for over fifteen years, and my muscle memory for Emacs has only really changed twice: once in 2008 when I added a suggested configuration for FreeBSD developers, and once again in 2010 when I switched to the Dvorak keyboard layout.

I also like having a high level of interactivity as I type. Keys echo immediately, colours change as syntax, spelling, and grammar require, auto-completion runs… arguably the only real reason to choose Vi is that one only really needs a bad dial-up link to justify its lack of interactivity; this is also why I can’t stand Vim: that one redeeming feature has been removed. Given that everyone nowadays has consoles that perform well, there’s nearly no reason to warrant an editor as minimalist as Vi.

Another thing I like Emacs for: I run a single Emacs, and can easily switch to it in a terminal or as a graphical frame. That, I find, is the killer application for me: being able to leave a single editor process running, and quickly jump into it.

And another thing: I adore Lisp, and GNU Emacs is a small blob of C surrounded by a large number of parentheses. Lisp is a great language for defining and describing text manipulation, but a good general purpose language for programming at large.

Over the time I’ve used Emacs, computers haven’t changed much: X11 is still around, keyboards and mice haven’t changed in scary ways, and the wide variety of Unix and *nix-like OSes still exist. Okay, sure, hardware has gotten faster, software has gotten more bloated, and the Internet has gotten everywhere. But still, I’ve had no reason to abandon a text editor that works well that’s flexible, powerful, configurable, and friendly.

How could you get started with Emacs?

Run it, dammit! It even tells you how to learn it.

(If you feel like trying Emacs in hard mode, try ~jashankj/bin/mg on a CSE system; it’s a very small Emacs.)