Mac OS X

Seeking Mac editor nirvana

I’ve written about Mac text editors before on the previous incarceration of Ray Gun Robot. My preferred editor, the one I use every day at work and home, is Smultron. It’s nice, for reasons I’ll get into, but I wouldn’t mind having a few features that more mature text editors have, such as syntax hinting (is it strpos($needle, $haystack) or strpos($haystack, $needle)?) and scriptability.

Inspired by a post entitled “Komodo vs Coda” (found via Planet Drupal) and subsequent comments, I recently spent some time looking over a selection of Mac text editors and IDEs, seeing what the alternatives were, as I periodically do. Unfortunately, what I found has convinced me to stick with Smultron still.

After a bit of consideration, I came up with four criteria that a text editor must have to be usable in my opinion. There are others, of course - syntax coloring, regular expression searching - but those features are common enough among all editors that dare call themselves such that I won’t bother mentioning them. Those criteria are:

  1. Smart indenting. If I start a function by typing something like function foo($bar) {, the editor should be smart enough to realize what I’m doing and indent the next line by a tab stop to help keep my code tidy. Furthermore, if I end a function by typing a single } on a line, it should unindent that and the next line. (It would be really awesome if the editor could do that with array( declarations too, but I’ve gotten used to indenting those manually, unfortunately.)

  2. Mac-like. It should support standard Mac keyboard commands; it should use standard Mac user interface widgets; it should support the standard OS X spell-checking dictionary; it should feel svelte and unbloated; etc. It should also work like a Mac app when it comes to keyboarding around the document: the Home/End key should take you to the top/bottom of the document, not the beginning/end of the line; the Page Up/Down keys should scroll the viewport without moving the cursor; etc. (See my post on Mac OO.o 3 for more rants about supposed Mac applications adopting Windows’ lousy (in my opinion) text editing interface.)

  3. Vertical window splitting. Window splitting allows you to have two (or more) documents open in a window. This is handy when you want to work on HTML in one file and CSS in another file at the same time; or to refer to a database schema in one file while writing code in another file; or to work on a template file while referring to a code file… this feature offers a huge boost in convenience and productivity. Some editors only allow you to split horizontally, but I much prefer vertical splitting, especially nowadays that most displays are much wider than they are tall. Also, simply opening up two windows and displaying them side-by-side is not an acceptable alternative; you end up with redundant user interface widgets, and you can’t quickly and easily resize or minimize the windows at the same time when you need to get them out of the way. These problems are gone with true window splitting.

  4. Reasonably priced. When I can go out and buy the latest 3D whizbang video game for $60 or less, ponying up over $100 for a text editor seems a little bit ridiculous. Granted, I may spend ten hours or less playing the video game, whereas the text editor will be used eight hours a day, five days a week, for the indeterminable future; still, I can’t imagine that the latter took all that many more man-hours to develop than the former. However, for the perfect text editor, I’ll pony up two days’ pay… it better be pretty waeome, though.

Okay. So here’s a snazzy chart showing how several OS X editors compare with regards to these features. Note that some of these might be a little off, as I haven’t actually used all of them; so on some of them I’m just guessing by the feature lists. Lemme know if I made any obvious mistakes. (The chart uses Japanese-style maru ◯ for “yes” and batsu × for “no” because I’m a nerd.)

Editor Smart indenting Real Mac app Vertical splitting Reasonably priced
BBEdit × × ×
Coda × ×
Eclipse × ×
jEdit ×
Komodo × ×
MacVim ×
NetBeans ×
Smultron
SubEthaEdit ×
TextMate × ×

This table is very basic, but it’s enough to see that some would-be-great editors have some glaring oversights which are stopping me from switching. TextMate has a lot of buzz and cred among Mac nerds, but the fact that it doesn’t support window splitting, vertically or otherwise, seems to me to be a staggeringly unacceptable omission to what is otherwise a slick and mature editor. Likewise with SubEthaEdit, which actually predates TextMate (if I recall correctly) and features support for the ability for two or more people to work on a file concurrently over a network - this strikes me as a rather esoteric feature, which makes the omission of a basic feature such as window splitting all the more annoying. (SubEthaEdit also has the lowest price among the non-free editors on the list.) Coda is possibly the youngest editor on the list, but one which has picked up a lot of steam with its support for IDE-like features like syntax hinting and revision control systems; but the fact that it’s the only editor on the list which can’t smart-indent for me makes it useless. jEdit lets you go absolutely crazy with window splitting, letting you split windows horizontally and vertically in the same window; too bad its non-Mac-native interface looks like butt. BBEdit has been around since at least the early ’90s, and was probably the first real serious industrial-strength editor on the Mac, but it doesn’t seem to have really changed much since then, and again, the lack of splitting is an annoying oversight. MacVim was an interesting inclusion on the list, being a version of the venerable vim command-line text editor with some Mac interfacey spit and polish on it. I can’t find myself calling it a true Mac editor, though.

So I’m sticking with good old Smultron for now. It’s served me well for a couple of years now, and looks like it’s going to continue to serve me well for a little while more, at least until other editors can come out with the features I’m expecting.

Syndicate content

About RGR

Ray Gun Robot is the personal site of Garrett Albright, a fairly decent web developer and Drupal themer living in northern California. I don’t update this site much anymore, though. Find out more about me.