Having explored other text editors and remained unsatisfied, I’ve committed to using TextMate for the foreseeable future. My only hesitation was that TextMate was getting to be practically (although hyperbolically) abandonware. Thankfully, this fear was assuaged by a recent update over the Thanksgiving holiday. It lives!
I keep an eye on the discussion about TextMate on Twitter Search to see how people use it; it always pays to learn about one’s tools. Daily, I see complaints from new and seasoned TextMate users alike that are easily addressed. To that end, I’d like to share the add-ons I use that keep TextMate and I on friendly terms.
This plug-in for TextMate transforms its homely, outdated project drawer into a stylish, Leopard-style panel. ProjectPlus then imbues this new drawer with powers: carrying over color labels from the Finder, preserving the state of the project tree between openings, QuickLook previews, sorting options, overlaying files with their version control status, and more.
This plugin alone spruces TextMate up enough that you won’t be pining away for the next major release. But read on!
No, not old, inscrutable GetBundle. GetBundles, plural, is the more modern way to get new bundles for TextMate. Bundles are tidy packages of code and resources that let TextMate work with additional languages and file types, or add features. If you’ve ever wondered “does TextMate support Foo?”, chances are good that there’s at least a bundle in development for it.
GetBundles is totally sweet. It goes out and checks not just the official TextMate bundle repositories but GitHub as well. Once it’s got an authoritative list of all the bundles out there, it lets you install them with a click. You don’t even need to restart TextMate to make use of newly installed bundles. GetBundles is how you should get bundles.
To install, make sure you have Subversion (you do unless you’ve done something dreadful to your Mac), then fire these commands off from Terminal:
cd ~/Library/Application\ Support/TextMate/Bundles svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/
Head back to TextMate and click Bundles / Bundle Editor / Reload Bundles. Then click Bundles / GetBundles / Get Bundles and you’re off the races. The, uh, bundle races.
One of the frequent complaints I see on Twitter about TextMate is that its Find In Project feature is slow. And, well, it is. That’s why there’s Ack In Project, which uses the speedy ack tool to search your code ASAP. What’s more, you get beautiful, clickable results that appear as the search progresses. With Ack In Project overriding the keyboard shortcut for Find In Project, there’s no more need to complain about TextMate not keeping up with your searches. Install it right now — via GetBundles, of course.
If you’re working in a language that ack doesn’t support out of the box, be sure to toggle the “Advanced options” panel of Ack In Project and check the “Load defaults from .ackrc” box. In your home directory, create a
.ackrc file that looks like this:
--sort-files --color --context=1 --follow --group --all
That’ll give you some handy defaults, and the
--all option will ensure that your searches are comprehensive, even for files with weird extensions like
These three additions are my TextMate secret sauce. Depending on your particular needs, you might also get serious mileage out of the Git bundle and the Copy As RTF bundle, which is great for popping syntax-highlighted code into Keynote presentations.
Generally, get in the habit of periodically pulling up GetBundles and seeing if there are new ways that TextMate can help you out with the languages and tools you work with. Once you’ve installed new bundles, explore what they can do either via their Help command or by browsing their contents in the Bundle Editor.
Since I stopped fussing about with trying to make aging editors as smart as TextMate, I’ve been productive and satisfied. Hopefully, with these tips, you’ll be too.