The Pug Automatic

Pinch to fold in TextMate

Written March 24, 2008. Tagged OS X, TextMate, MacBook Air.

I tumbled this a good week ago, but I suppose I should blog it here as well, with the larger readership and comment functionality.

With a multi-touch Mac (MacBook Air or newer MacBook Pro), you can use MultiClutch to configure your own multi-touch callbacks.

You can't configure new gestures for now, but assign keyboard shortcuts to the ones that exist.

I set up a pretty sweet one:

Zoom In: F1; Zoom Out: F1; Zoom Out, Zoom In: Command+Option+2

With that configuration, you can pinch closed to fold the current block in TextMate, and pinch open to unfold it. Since the TextMate keyboard shortcut actually toggles, you can pinch open to fold and pinch closed to unfold, too, if you're into unnatural mappings.

You can open and then close in succession to fold or unfold at level 2, which in my case is usually method definitions.

I would love to hear of what other mappings people have set up. Swipe to change tabs in various apps is an obvious one.