So my awesome girlfriend Johanna said I should do a “TextMate Tip of the Day” post series. I thought it was a good idea but sounded like too much work, so I dropped the bit that implied I had to do it daily and here we are. And for my first trick:
This window is your…window into the overwhelming number of things that TextMate can do. You bring it up by either pressing
⌃⌘T or using Bundles → Select Bundle Item…
You type a query to search through the applicable bundle items. For example, if we were trying to comment the current line we would type “comment” and the “Comment Line” command will be displayed. The search results also show the key equivalent/tab trigger for the command, so in the future we know we can just use
⌘/ instead of searching again.
Note: This method of searching isn’t always fruitful since we might not be able to think of the correct term to search for. It’s always a good idea to look through the relevant bundle menu(s) for what you want though (you can pop up the bundle action menu by pressing
However this method is always useful for items which we know of that have no shortcuts, or for which we can’t remember the shortcut. Items which we know the name of can be found a little more efficiently, by using the first letter of each word in the command – e.g. the “Comment Line” command can also be found with just “cl”.
There are also a couple of other more obscure uses:
- By pressing the magnifying glass in the search field we can switch to searching by key equivalent – this is useful if e.g. we want to know what a particular keystroke does
- By typing the query ALL IN CAPS the search is made global – allowing us to use items which are not in our current scope. For example, when writing PHP or editing the
php.iniconfiguration file, we might need to restart Apache – searching for “restart” won’t work, since the command is scoped to Apache configuration files, but searching for “RESTART” will
8 Responses to “TextMate Tip – ⌃⌘T”