Singular Value Consulting

Giving Emacs another try

I used Emacs for several years until 1995 when I started developing Windows software. I tried picking Emacs back up a few times since then, but each time I got frustrated and decided it wasn’t worthwhile. But things change and now I’m willing to give it another try. I’m well aware of the difficulties, but I think it may be worth the investment.

I’ve evaluated several editors on Windows, and I haven’t found anything as powerful or as configurable as Emacs. But the main reason I’m willing to try Emacs again is that I’m tired of using a different program for every kind of file I edit. I use a dozen programs, none of which I know very well. I want to learn one tool well and use it for many different tasks. As the Emacs guided tour says:

All of the basic editing commands (and there are lots of them) are available no matter what you’re trying to do: write code, read a manual, use a shell, or compose an email.

All the tools Emacs provides for opening, saving, searching, and processing text (and more) are available to you no matter what you’re doing.

Using Emacs is painful at this point, like the first day getting back to an exercise routine. But some old habits are starting to coming back, and I’ve discovered a few customizations that make Emacs more convenient.

I’m doing an experiment. I’ve committed to using Emacs through the end of April. After that I may decide that the quirks of Emacs are either too much to get used to or will take too much effort customize around. Or I may decide I want to keep using it and dive deeper.

Post navigation

9 thoughts on “Giving Emacs another try”

1. Learn to use the built-in command line shell, eshell.
2. Use emacsclient, which will allow you to push files into an existing emacs session from anywhere. I have command line aliases to do just this so all I do is type “edit x” and x pops into emacs. If you’re on Windows you can also add a right click menu option for all files to do this too.
3. If you’re on Windows use the native emacs not the cygwin one.
4. Map caps lock to control. You don’t have to stretch so far with your pinky finger. Who uses caps lock anyway? You can always map it back to control if you want…
5. Emacs has a vi mode if you’re familiar with vi. I recently tried gvim for about 6 months and when I came back to emacs I put it in vi mode. I think vi’s editing commands require less effort to type. The emacs commands require you to constantly hold down control. If you’re not already familiar with vi then this may be more hurt than help… I came back because gvim doesn’t have anywhere near the ability to recognize syntax that emacs does. That and for elisp.
6. Which brings me to my next point. Elisp is required for serious usage.

What do you use for template generation? (i.e. if your creating a new file, say foo.h or foo.py, what do you use to insert common author, copyright, etc… information into the file?)

Also I use a tool that given a set of paths will index all of the files in those directories. Then I have a command line utility called “managed-edit” (aliases me) that will take a partially complete file name, prompt me for suggestions based upon what’s in the index, and then blast my selection into emacs. This is highly useful because locating files on disk is a pain. (And something an IDE usually gives you for almost free.)

If you want my template generation program or managed edit let me know. It’s a distributable python package and is well-documented and generally in good shape.

I think a lot of people don’t view a text-editors as serious tools, but they are. When it’s something that can become a full IDE and is as extensible as Emacs or Vim there become a lot of nuances and tricks to using it well. When you want to work with a tool of that sophistication, you’re going to have to put in some training time.

I still remember making the switch to Vim a few years ago. It was pretty painful at first, but now I wouldn’t use anything else. I would argue it has been a net gain in productivity.

Well, Emacs has had parentheses matching by default for a long time. But the default has been to simply highlight the parentheses. This actually highlights the whole region in between the parentheses.

Some may not like it, though. But I thought I’d throw it out there.

Many people also use ibuffer and icycles. I haven’t tried either, so I can’t comment, but people really swear by icycles. Supposedly makes Emacs friendly for the beginner, but is quite powerful and doesn’t get in the way of advanced capabilities: