You are currently browsing the monthly archive for May 2008.

Like a great many Mac programmers out there, TextMate was my code editor of choice, and not just for my Cocoa work, either. HTML, CSS, PHP, pretty much everything that emanated from my keyboard as plain text was done up in TextMate. I even use it as my plain text viewer for everything from .log to .csv files, and looking at syntax-coloured diff output by way of svn di | mate can’t be beat (except maybe by Changes).

But recently, TextMate’s dominance of my programming attention has faltered slightly.

TextMate’s Rise to Glory

When TextMate 1.0 was released, I took it for a spin and was underwhelmed. I can’t recall now what it was I didn’t like, but it just didn’t gel with me and I reverted back to using Xcode for my coding.

Somewhere down the line, I decided to take TextMate out for another run around the block. Mr. Odgaard had been making regular releases, and the changes that came from those updates were more than sufficient to sway me into switching back to TextMate.

Using Xcode 2.x on a 450MHz G4 (my primary machine at the time) wasn’t exactly an exercise in responsive computing. The most irritating thing wasn’t that the compiles were slow—whether I was using Xcode’s editor or an external one such as TextMate, I was still using Xcode for the builds so I was hampered regardless—simply using the text editor made my computer feel old[er than it already was]. Writing code in TextMate, however, was silky smooth; I wasn’t waiting for the editor to catch up to what I had just finished typing. This alone was a huge mark in favour of TextMate since, as someone who types at 100 words per minute, it was something that I perpetually had to deal with in Xcode.

Add to that TextMate’s ability to build and run the Xcode project the source files were a part of made the experience all the more pleasant as I wasn’t having to switch back and forth between applications simply to try out the code changes I’d just made. I made the switch to using TextMate, and that was the status quo for quite some time.

Two killer features of TextMate that I make heavy use of are Go to File and Go to Symbol. The ability to jump between files in a project and to various symbol points within those files really speeds up my workflow, especially being someone who lives on keyboard shortcuts. As a user of LaunchBar, the ability to type in familiar shorthand like, for example, afn and have the symbol list filter down to select -awakeFromNib just made it that much more useful.

Xcode had Open Quickly, but you couldn’t shorthand the filename, nor could you simply navigate the list of files in the current project with the arrow keys, like TextMate allowed. Similarly, Xcode had a symbol pop-up but I wasn’t aware (at the time) of a keyboard shortcut to pull it up so I was always reaching for the mouse to quickly flip somewhere else in the current file.

Xcode Plays Catch-up

When Apple released the iPhone SDK, it included new versions of the developer tools. Xcode 3.1 had many refinements and updates, and a few in particular got me to give it another chance at filling the role of my full-time code editor.

Some time prior to this, I had discovered ⌃2 gave keyboard access to the symbol pop-up menu. And with beta 4 of the SDK, Apple had made some significant changes to Open Quickly. I can’t go into specifics on what those changes were due to the NDA covering the SDK, but I can say that they put it practically on par with TextMate’s Go to File command, with a nice UI to boot. The two features of TextMate that I used most were now part of Xcode.

Another aspect of TextMate that saw frequent use from my fingers was snippets (which themselves are part of the stellar Bundle system). Around the same time as the SDK was released, I stumbled upon the documentation for creating custom .xctxtmacro files. I migrated my custom snippets used when writing Objective-C code over to Xcode text macros, and the final piece of the puzzle was in place: the primary features that allowed me to be really efficient in TextMate were now available to me in Xcode.

Toss in the fact I was once again able to use a single application for most aspects of my Cocoa development—plus having the debugger right there, ⌃ and ⌘ double-click, etc.—and Xcode has now regained its position as my primary programming tool. I even started playing with using the All-In-One layout mode thanks to a few more keyboard shortcuts, and I’m liking it quite a bit. I do miss a few things from TextMate, like the columnar editing mode, but I made use of them infrequently enough that it doesn’t impact my workflow to be without them now.

Looking Ahead

While I may have switched back to Xcode for my Cocoa-related coding, I still use TextMate for everything else, even writing my svn commit messages. It’s just such a capable editor and it meshes quite nicely with my workflow. But at least for the time being, when working on my software, Xcode is where I spend my time thanks to the changes Apple has made with version 3.1.

Who knows, TextMate 2 might sway my preference back in its favour. I’m quite happy to get to make a decision between two products that I really like, rather than be forced to pick from a field stagnating in mediocrity.

Advertisements