Quantcast
MacUser
News, info, and opinion by Mac users, for Mac users.

In praise of snippets

Posted by Pat Nakajima | Wednesday, April 18, 2007 1:34 PM PT

TextMate iconIt seems that no matter where my personal computing adventures take me, TextMate is never far from my side. Whether it’s the old standbys web design and blogging, or even when impulse takes hold and I decide that the fact that I don’t know that I can’t write a one-act play in one evening doesn’t necessarily mean it can’t be done. TextMate is my weapon of choice as I tackle each and every endeavor that revolves around text. Why? Because of its keen usage of snippets, and the relative lack of difficulty involved in creating your own.

I’ve created snippets for virtually every task that would require me to type more than a few keystrokes. I can call upon them to build pesky HTML forms, document templates, repetitive Ruby idioms, and even the occasional obtuse metaphor (just kidding. I haven’t created one that can actually write my posts for me… yet.) The time saved may be negligible at first glance, however, over the course of a 3 hour coding session they’ve proven to be invaluable.

You can learn how to create your own snippets by using the guide on the TextMate wiki, or you can just play around with the ones that are built in to TextMate. I’d recommend skimming the former, then diving headfirst into the latter. Of all of the schemes I’ve concocted to boost my productivity, I believe learning how to program my text editor has been the most valuable. So give it a go, and if you have any tricks up your sleeve, please do tell.

Archives

Categories