I can’t believe I’ve finally done it. I’ve quit using Emacs.

Over the past month, I’ve switched to using TextMate as my day-to-day programming editor. Since I live in my editor 4-12 hours per day, this is a huge change for me. I’ve been using one form of Emacs or another since late 1990 or early 1991; that’s a huge amount of inertia to overcome. It’s been a lot easier then I expected, and I’m starting to really enjoy a lot of TextMate’s features.

Here are a few of the advantages that I’ve seen with TextMate. Some of these are quirks of my setup, but others are fundamental things that TextMate gets right that Emacs couldn’t do without a 6-month flamewar and a couple forks:

  • TextMate’s Rails support is better then XEmacs’s. XEmacs’s Ruby mode has a few quirks that frequently broke indenting, and it completely failed to understand .rhtml files. I’m sure that I could have fixed this, but after 14 years of using Emacs, I still hadn’t bothered to learn more then a few bits of elisp. Frankly, I really only used 1-2% of what Emacs could do, partially because most of the rest of it was such a pain to learn about.

  • For some reason, cut-and-paste between X11 and native Mac apps broke during my Tiger upgrade, and I was never able to get it fixed. It wasn’t usually a big deal for me when I was working on code for Network Clarity because I rarely ended up pasting things into Emacs, but it was a huge pain when I was working on Typo.

  • TextMate is actually better at handling tons of open files then XEmacs is. This surprised me, but the interface for switching files from the keyboard is way better in TextMate. Just press Command-T and start typing pieces of the filename. TextMate starts searching for filenames that match the name you typed using the same algorithm that QuickSilver uses. So, if you want to find articles_controller_test, TextMate will let you type something short like artcontest while narrowing the field of files down with each extra character that you press. XEmacs expects you to type the filename starting at the beginning, using tab for completion. So finding the same file with most of Typo’s source open would be something like ar<tab>s_c<tab>_t<tab>, which is more of a pain. Plus, when you have multiple files with the same name, Command-T will let you use the arrow keys to scroll through them, seeing the full path for each. XEmacs seems to prefer that you remember which of the half-dozen content.rhtml files in Typo is content.rhtml<4>. Finally, when you’re in project mode, Command-T will actually search through all files in the project directory, not just open files. So Command-T artrb will show you articles.rb. That’s much nicer the C-x C-f ../../../app/models/ar<tab> that Emacs needed. I’m sure that there’s some way to make XEmacs friendlier on this front, but that really means very little–there are ways to make Emacs solve Towers of Hanoi problems, read your mail, act as a web browser, play inline movies, and quote Zippy the Pinhead quotes to Eliza, too. Just because it can do it doesn’t mean that I’m willing to spend two hours figuring it out for each and every feature that I’m interested in.

  • TextMate is better at pasting text. It automatically re-indents the pasted text, so you don’t have to go line-by-line fixing the indentation.

  • TextMate supports most of the basic Emacs editing keystokes – C-f, C-b, C-n, C-p, C-d, C-k, C-y, and C-s all work like I’d expect (although C-y was missing for a while), so I haven’t really had to reprogram my fingers.

  • Finally, it’s a native Mac app, so it works like all of the rest of the apps on my system. While it’s nice that you can run X11 apps in OS X, there are a number of quirky things that they do that makes them feel weird after three years on the Mac. They don’t hide right, they don’t act right when you change the focus, and they just generally look weird.

So I bought it. TextMate is €39, which is kind of a shock when you’re used to free editors, but it’s not a bad value at all. It’s dirt cheap compared to BBEdit, which I’ve tried a few times and never really understood why anyone would pay almost $200 for it. All in all, I’m really happy with TextMate, and I feel like I’m substantially more productive when working on Rails apps with it because I don’t have to keep working around Emacs foibles. So far, it Just Works.