In praise of Smultron

Thu 14 Feb 08 21:58 | Tags: Mac, Programming, Software

I write this post in praise of what I think is one of the unsung heroes of development on the Mac; the Smultron text editor.

The shadow of TextMate looms large and dark, despite its ~$60 shareware fee. It's by far the most popular text editor among Mac coders, and it even has its own dead tree book. However, even though I'll occasionally go back and give it a try, I keep coming back to Smultron, and not only because it's free.

One document at a time? That's for sissies!

Smultron supports most of the features of competent text editors, such as tabbed editing (Smultron uses vertical drawers by default, but can be easily switched to use horizontal tabs), automatic line numbering, syntax coloring, integration with FTP programs such as Transmit, and so forth. But let me quickly run a couple reasons why I keep choosing it over others, including TextMate. (This list might not be totally fair, since it's been a while since I last tried TextMate.)

The most common uniquely Smultron feature I use is the Split Window feature. This lets you look at two documents, or possibly two different parts of the same document, in one window. The window is split horizontally if you just select the Split Window item from the View menu (or press Command-Apostrophe), but holding down the Option key while opening the View menu (or pressing Command-Option-Apostrophe) lets you split the window vertically, which I find much more handy in these days of triple-wide monitors. Editing a template, but can't remember what variables you've assigned to it? Open up the template in the left pane and the code where you've assigned the variables in the right. Made a complicated function and you can never remember the order of the parameters when you go to use it? Open the function definition in the right pane, and continue hacking away on the left. What a great feature!

Another great feature is the Advanced Find & Replace window. The regular Find feature (Command-F) just uses the simple standard Mac OS X find-and-replace tool, but the Advanced Find feature (Command-Shift-F) works with regular expressions. That in itself is not too fascinating, but what's cool is that it will build you a list of lines that match your pattern, and selecting the line will show you where that line appears in the document in the pane below. This is absolutely great for testing regular expressions before you do a replacement with them. It's also handy for testing a regular expression that I want to use in my code instead of on it; I just open up a new tab, paste or type in some sample data, then bring up the Advanced Find window and test and refine my pattern until it's perfect.

And did I mention it's free?

The Advanced Find window. Very cool.

It's lacking a few features, though, of course, most notably any auto-completion features of any sort -- though I personally don't miss 'em. Also, though it's possible to make your own syntax definitions for syntax coloring if one of the fifty or so included with the program doesn't suit your needs, or add one that someone else made, it's not very convenient; you have to literally use the Finder's Show Package Contents feature on the app itself and root around in there -- the process could be much easier.

Still, if TextMate isn't cutting it for you -- or maybe you just can't afford it -- it couldn't hurt to give Smultron a try. With my current job, I can now easily afford a more expensive, more feature-packed editor, but I'm still sticking with Smultron.

Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Feed icon Articles & LinksVia Email
Feed icon Articles OnlyVia Email

1 Comment | 0 Trackbacks | Digg this article | Bookmark with del.icio.us

 

Trackbacks

No Trackbacks

Comments

#1 | Jeremy | 2 Mar 08 16:21

i too use smultron. i enjoy its simplicity. i've considered text-wrangler, but have never been able to make the switch.

command-t to auto complete a tag. works great. code your open tag, type you text or whatever, command-t will automatically add the closing tag. works with nested tags as well.

Add Comment

RGR is a safe-for-work site. Please avoid posting explicit content, and please clearly label any links which link to explicit content. Comments which do not follow these guidelines will be deleted. Thank you.

Name:

Web site:

Comment:

Markdown format allowed

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA