43 Folders

Back to Work

Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.

Join us via RSS, iTunes, or at 5by5.tv.

”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.

TextMate parking lot

I can tell I’ll be spending a lot of the next few days exploring TextMate. In the interest of efficiency, I’ll park all my preliminary notes and “gee whiz” stuff in this post. I may do a fuller review/intro later, but I want to share what I’m learning since there’s so much interest in this app.

[A plea: Let’s please keep the Hatfield and McCoy stuff over in the Google Group. I know, I know. “Vim is better” and “emacs is better” and “cuneiform scales better” and “BBEdit saved my baby from a man with a big knife,” but please don’t carp here. If you (don’t care about|hate|want to destroy all traces of) TextMate, just move to another post or start your own thread on your site, cool? Cool.]

On with the motley!

update: added links to other folks’ interesting TextMate posts.


Cool stuff

Pipe web previews through a script of your choice

As with many other text editors you can preview how text will look as a web page from within the app. TextMate allows you to optionally choose a script on your Mac through which the content is piped before visual preview. I’m thrilled that the default is Markdown—I maintain all my text files in Markdown and now I don’t have to do a lot of keyboard gymnastics to see what it will like when it’s parsed to HTML

Tm1markdownpiping


Create powerful snippets with tab-able variables

TextMate allows you to create “snippets,” which are abbreviated strings of text that can be triggered to “explode” into much longer strings of text with a simple TAB command.

I like how you can define variables in the exploded string and then hit TAB to move from one place to another. As an example here’s a snippet I made to pick you guys’ pockets through Amazon links.

When I want to create a link to a book on Amazon, I type amzn and then TAB and this gets typed:

<a href=“http://www.amazon.com/exec/obidos/ASIN//ref=nosim/43folders-20” title=“”><em></em></a>

What you can’t see is that there are are three variables in that string, as expressed in the source for the snippet:

<a href=“http://www.amazon.com/exec/obidos/ASIN/$1/ref=nosim/43folders-20” title=“$2”><em>$3</em></a>

Those dollar signs and numbers are telling TextMate that these are the three spots where I’ll want to add or edit text each time this snippet gets exploded.

The smart part is that TextMate automatically places the cursor at the point of the first variable (“$1”) so I can just start typing (or paste in) the ASIN for the book. Then, I hit TAB and the cursor moves to the next variable (“$2”) where I start typing the TITLE tag, then I hit TAB again for $3 (the link text that's shown on the page) and so on.

I will use the crap out of snippets.


Coming soon

  • Setting some basic variables

Questions, Requests & Gripes

  • Question: Is a Macro the most efficient way to pipe results from a shell activity (via “Filter Through Command”)?
  • Feature Request: I’d love it if there were a single page with pointers to contributed snippets, macros, and bundles. Also a support/community forum would be helpful
  • Feature Request: If I have a document open in a project and “open” it from the Finder, I don’t want a new window to launch (bring it to the front in its project window)
  • Feature Request: Would like to be able to drag text onto document icons and have it append
  • Feature Request: (More like LazyWeb) Anybody want to take a crack at a syntax coloring for Markdown?
  • Gripe: Why no “Print” functionality?
  • Gripe: I miss “I-Search” - A TextMate window apparently is not a “NSTextView” (whatever that means) so I-Search no worky. There’s regexp everywhere so I should probably not sweat it, but I-Search (as well as fiwt) have become de rigeur, muscle memory utilities for me. I’d definitely love to see TM line up with other Cocoa apps on this one.

TextMate Elsewhere

alan's picture

GUI for configuring bundles and...

GUI for configuring bundles and info.plist-related stuff

You mean, like, a preference window? ;)

 
EXPLORE 43Folders THE GOOD STUFF

Popular
Today

Popular
Classics

An Oblique Strategy:
Honor thy error as a hidden intention


STAY IN THE LOOP:

Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed

Cranking

Merlin used to crank. He’s not cranking any more.

This is an essay about family, priorities, and Shakey’s Pizza, and it’s probably the best thing he’s written. »

Scared Shitless

Merlin’s scared. You’re scared. Everybody is scared.

This is the video of Merlin’s keynote at Webstock 2011. The one where he cried. You should watch it. »