Using Emacs

Vincent Foley over at Occasionally sane has an interesting post entitled Why I Still Use Emacs. Foley lists the usual suspects (extensibility, Org Mode, GUI or CLI operation, excellent built-in documentation, configurability, Tramp, and all the other reasons we love Emacs) for his decision to forgo IDEs, such as Eclipse, in favor of Emacs.

One of the things I have found throughout my career is that serious programmers pretty much stick to one of two (arguably three) editors: Emacs or Vi(m), and on OS X, TextMate. When I see an engineer using one of those editors I can be pretty sure that they know more than a single language, care about their tools and take the time to optimize their work flow around those tools, and care about speed and making development as frictionless as possible. When I see someone using notepad or a similar abomination, I can be pretty sure the above does not apply.

Are there exceptions? Of course but I think the generalization is a good one. Sure, the guy in the next cubicle uses Emacs to program in Basic and not very well at that and the polyglot wizard on your team turns out to prefer Nano for reasons that no one can understand but

serious_programmer == uses {Emacs | Vim | TextMate}

is a pretty good first order approximation.

Interestingly, the users of those 3 editors sometimes switch but almost always to another editor on the list. I'm guilty of that myself having been a Vim user for many many years and then switching to Emacs as I started to do mostly Lisp and Scheme programming. Others near and dear to me started with Emacs and switched to Vim. Likewise, I'm sure a lot of programmers switch to TextMate when they start using a Mac. I've never heard of anyone switching from Emacs to Notepad though.

Do I think using Emacs/Vim/TextMate makes you a better programmer? Possibly but the more likely explanation is that a craftsman picks the best tools available. Do I think everyone should use one of those editors? Frankly, it's hard to see why they wouldn't but choosing an editor is like choosing a mate and others had best stay out of the matter. I remember the feeling of horror I had when a manager from long ago suggested we settle on a standard editor. Happily I and some of the other senior engineers were able to explain the facts of life in time to prevent a mass exodus.

I'd be interested in hearing if my experience matches that of my readers. Do you find that most serious programmers use the Emacs/Vim/TextMate? Do you disagree with that observation for some reason other than hurt feelings? If so, leave a comment.

This entry was posted in General and tagged . Bookmark the permalink.

10 Responses to Using Emacs

  1. Greg says:

    At a previous job, most developers (myself included) used MS visual c++ since the app was for windows, and almost everyone was a serious programmer. I switched to emacs when I started at my current job, which does linux development. For windows, visual studio is a reasonable choice.

    • jcs jcs says:

      I understand the urge to use IDEs like Visual C++, especially if that's all you do but I don't see how people use an IDE for C++ or Java or whatever and then some other editor for other stuff. It seems to me that you can never (or at least I would never be able to) become efficient with more than a single editor. Even now, after 5 years with Emacs I still sometimes use a Vim keystroke--it's always comedy hour too since it's invariably something like Ctrl+k to move up.

  2. Xah Lee says:

    Jon, excellent essay.

    though, i venture a challenge that this may not turn out to be statistically true.

    in my day job 1998-2002, our lead coder uses emacs. He knows coding better than me, however, he's use of emacs is minimal. Like, start emacs on a file everytime, then quit emacs. He would not be interested, for example, of going into info in emacs. I don't think he even use dired. Matt would get excited about algorithms, AI, but not emacs. (Matt is a white American.)

    While, the rest of the team (mostly Indians), uses vi. These people as far as i know have little or no interest about algorithms, math, AI, computer languages, nor the details of vi, emacs. I guess that they were taught vi in school, just because every unix comes with vi. They just use it to carry out a job. They do not, for example, find it exciting to explore the so many tricks such as those in vi golf.

    then, my long time colleague Robby that i respect at Wolfram Research (who died few years back), uses NEdit, which is one of the GUI editor on unix/NeXT. He knows the basics of emacs and vi, and have the sentiment that one day he'd like to learn more about emacs/vi, but i guess that it just never happened.

    Then i know others online who are advanced programers on Windows platform, and i think their tool of choice is Microsoft Visual Studio (or perhaps other Windows IDE). I know some alpha coder on Mac uses OS X's default IDE X-Code. (e.g. jwz does.) (btw, you probably forgot to mention, that BBEdit is the editor king on Mac and before TextMate came alone.)

    … in summary, when i look back of all the coder that i know in meat space, actually it'd be hard-pressed to say that i knew a single person who's really into emacs or vi, except myself. The emacs/vi creatures i know only in the online world!

  3. Jonathan says:

    This post feels antagonistic. While those editors are well and good, summing up a developer like that feels a bit bullish & mean-spirited.

  4. Ryan says:

    It would be interesting to see the complete graph of "How many people switched from editor X to editor Y?" for all values of X and Y. That would really answer the question once and for all. Not sure where you'd get such data, though.

  5. Alan says:

    It's funny: I started using Emacs in 1995. I switched to Vim in 2001 as I could not get my head around configuring Emacs with Elisp, and I liked the modal approach. I then went to TextMate as I got to OS X around 2007, as it provided better integration with the system. And about a year ago I switched back to Emacs, for a simple reason: I need an editor that can launch a process and interact with it, to write interactive profs in Coq. I'm probably not going back, as I've discovered org mode, the pretty good OS X integration of Aquamacs, and the nice vi-like key bindings of evil.

  6. David says:

    I'm a die hard Emacs user, but use Eclipse for Java programming. The problem is that Java itself and especially all those frameworks which you need to deal with the inadequacies of the language are really meant to be used with a full blown IDE (allThoseCamelCaseOverlyLongMethodNamesAintThatSOMuchClearer). Really, without Quickfix you're going insane pretty soon. But that's more a problem with the current 'state of the art' in the Java world, not so much with Emacs.

  7. Tom Davis says:

    Keeping in mind that spending my career avoiding Java and Microsoft stacks skews the result, my experience matches yours almost without exception.

    I've had the pleasure of knowing a lot of talented developers, and they've all used one of those editors. I think it has very little to do with editors and a lot to do with how much interest, dedication, and attention to detail a person has. The more time and energy you invest in this craft, the less patience you retain for things that don't work exactly the way you want them to. Is it universally true? Of course not. But I've found it's a damn good indicator.

    Just to prove it's not an editor thing, I work with a guy who uses Emacs. His usage consists of using C-z and `fg` to switch between shell stuff (and oddly, even switch files), and he knows about 3 key bindings. He's also got next to no attention to detail in his code. I think respondents who say "I use Emacs/Vim except when doing " are missing the point: they're already in the "smart and (at least somewhat) perfectionist" group, they're just also pragmatic enough to use something else when it would be super inefficient not to.

  8. Zach says:

    I'd like to submit another editor for the list: Sublime Text 2. It is very similar to TextMate with a few key differences, the foremost of which I'd argue is a VI mode (called vintage-mode). Many of your favorite vim commands may be missing, but you'll find a large portion of handy movement and editing commands at your disposal. While in insert-mode, Sublime acts as if it's a regular editor, and you'll still have access to all of your os-specific keybindings. It's a lovely compromise.

Comments are closed.