While TextMate is no longer the code editor I use day to day I still end up using is at least weekly and I’ve found number of new shortcuts to make working with Textmate even faster. This is my second post about TextMate Tricks.

Fold the code

Sure we all know that TextMate can fold code with the little arrows on the sides of the editor but how do you fold code selections? To fold a selection of text simply highlight it and press F1 to fold it.

Go to Symbol

Want to see a snapshot of your document structure and navigate to portions of it? Well go to symbol (SHIFT-CMD-t) is like go to file for just the file you’re looking at. I’ve found it most helpful in my CSS files, and it even shows headers in the file I’ve used to mark out sections.

To Do List

Not sure if this is a bundle that comes with TextMate but I love the TODO bundle. Not only does it provide tab completion after you type todo. True it does keep adding comments around the todo note even if it’s already in comments but I just type successive notes. The real awesome power in this bundle is the todo list. CTRL-SHIFT-T and TextMate builds you a list of the todo notes in your file.

Tip of the Day

Yeah it’s not a keyboard shortcut but under the TextMate menu there is ‘tip of the day’, it’s how I found some of my little features. It can even be turned on for each startup.

####Killing Whitespace

There is little that I find as annoying as extra whitespace in files, especially when you start looking at commits in GIT and find cruft sitting all over the place. So lets wage a war on whitespace. Simply record a macro that uses the ‘Remove Trailing Spaces’ command from our menu then save the document. Now go in to your bundles and make that default to ⌘S and all of your work will have the white space removed before save. If you’re looking for a visual guide there is one.


Sure the regular ⌘T has lots of use but PeepOpen blows it out of the water. PeepOpen does way more than the default ⌘T. It integrates with GIT, and allows you to search down file trees. If you’re big on ⌘T normally the small cost of PeepOpen is totally worth it.