I mentioned that I’m sucker for new text editors right? Well this week it’s TextMate, and I’m glad I found it. TextMate is shareware, but it’s indy software and I like supporting indy developers. The main site lists TextMate at 39 Euros; However, there’s also a special U.S. pricing link buried in the developers’ blog that gives it a $49 price (via PayPal) for times when the Dollar-to-Euro conversion doesn’t work in your favor. Either way, it’s about 50 bucks, which puts it well below BBEdit’s hefty $200 price tag, but slightly above other indy apps like SubEthaEdit ($35) and VoodooPad ($25). (For reference, I do own BBEdit, SubEthaEdit, and VoodooPad, which all sit in my Dock, next to TextMate.)

I first saw TextMate in action in the “Get started with Ruby on Rails” video. It’s a short presentation that demo’s how to setup, configure, and start a Rails project on OS X. I decided not to start a Rails project just yet, but I did want to learn more about the text editor since it was doing some pretty nice tricks.

Instead of being an all-purpose, general text-editor, TextMate is an all-purpose, general, programmers’ text-editor. The difference is subtle, but it shows when you start writing code. Little things are automated, and generally correctly. In fact, after a week of using TextMate, I’m now caught off-guard when my other applications don’t automatically complete things like quotes, parenthesis, words, and tags.

Downloading and installing TextMate is the simple point-and-click, drag-and-drop process that you expect from OS X applications; However, you’ll be doing a bit more if you want the latest and greatest. You’ll be downloading the latest beta, which at the time of writing is 1.1b12, and using Subversion to check out additional TextMate modules. This is where things might get a little more involved, since OS X doesn’t ship with Subversion pre-installed. (Well, mine didn’t, YMMV.) To install Subversion, either download and build the source manually, or use Fink or Darwinports to automate it. (I’m an ex-Finker, now Darwinports user, if you’re curious.)

Once you have Subversion working, getting the modules checked-out and running is rather simple, and fortunately, the TextMate wiki has all the instructions online. The only extra directions you might need is how to get Subversion working through a proxy, which is done by editing “~/.subversion/servers”.

The various modules you’re adding enable support for additional languages. The modules, or Bundles as they’re called, are then editable using the built-in Bundle Editor:

Language bundles can enable a whole slew of capabilities. For example, the graphic above displays a dummy method definition template to be used while editing Python code. In this case, one type’s “def” followed by the TAB key to generate the definition stub, which contains specific chucks that are navigable using TAB. A screencast would explain it better, but for now let’s just say that it will save you time.

Simple things like opening a directory of files works elegantly as well. For example, drop a directory of files on BBEdit and you get a Disk Browser mixed with an editor view:

But drop a directory on TextMate and you get an editing context complete with a live directory sidebar and tabs for editing files:

TextMate also features “Code Folding” and “Show/Hide Invisibles” which are both rather handy when writing code. (Seeing invisibles can be rather important for tracking down gremlins and dealing with Python’s whitespace requirements.)

“Tag Completion”, “Word Completion”, column-editing, and Macro recording are also handy features, along with the oddly named “Execute Line Inserting Result” which sends the current line of text to the shell and replaces it will the commands’ output. (Type ‘date’, ‘cal’, or ‘pwd’ on a line and hit option-R to see it in action.)

TextMate isn’t without glitches though. I found some unexpected indentation behavior when working with Python files, which is particularly bad in a language that interprets white-space. (To be fair, I *am* using a Beta.) TextMate is also missing a few features that BBEdit has, like “split panes” (for multiple views into a single document) and the drop-down “function list” (for jumping directly to functions/methods/markers by name.) I also found at one point during a crunch that TextMate seemed to be slowing down on some of my very large files. Since time was an issue, I eventually had to shut it down and fire up the ever-trusty BBEdit to finish the work.

In general though, TextMate was worth the $50 to me and I’ve moved most of my text editing to it. It has some quirks, and there’s likely nothing you can do in TextMate that can’t be done in vim, but it certainly has it’s share of redeeming qualities. It doesn’t yet trump the all mighty BBEdit, but it certainly holds it’s own. Much like the experience of adopting tools like Quicksilver, Mail Act-On, and Sogudi, I feel more productive having TextMate in my toolbox.