Saturday, September 28, 2013

vi or Emacs: How to choose

This is a short post for anyone who has unwittingly strayed into the blasted earth between the two sides fighting the editor war. While I have a favorite side, my advice to all of you is to go with the stronger ally. Specifically, if one side has more troops close to your position, run to them!

To make this more clear, what I recommend to people who are learning Linux or computational science is to first realize that they need to pick one or the other, vi (vim, really) or Emacs, and to choose based on which one is easier to get help with. This conversation comes up with undergraduate and graduate students when they move beyond their laptop and have to do work on servers or clusters, when suddenly TextWrangler and Eclipse are missing.

Rather than rationalize an arbitrary choice, I tell them to go back to their research group and perform a survey of other people in the lab, asking: vi or Emacs? (Not favorite editor, because then you'll get results from the editor-or-the-month club.) Whichever editor gets the most votes is the one you choose.

My justification for this method is that vi and Emacs are reasonably well-matched in terms of the capabilities a new user needs, and that getting help is more critical. New user questions are almost totally of the "How do I...?" variant, rather than the "Can I...?" ones, and readily-accessible help is much more important at the beginning than whether or not one is installed by default, or the ease of changing the splash screen.

Now, I personally use Emacs and I have a great time making fun of vi users. The latter behavior is not rational, and I think everyone I do it to understands (I've certainly heard about the Emacs need for foot pedals). As to how I chose Emacs, it was using the same algorithm, but with a sample size of one--my girlfriend (now wife) used Emacs, so that's what I learned. (Seriously, not choosing the editor of your romantic partner is both foolish and a missed opportunity for bonding. "Oh, you remapped your caps lock key, too?")

OK, this post is a little longer than it needs to be to describe the process, so I drew you a picture:
Funky pinky or the inability to do two things at once: you decide!



No comments:

Post a Comment