Posts RSS Comments RSS 32 Posts and 1,017 Comments till now

TextMate Tip – ⌃⌘T

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.ini configuration 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”

  1. on 05 Nov 2007 at 12:49 amTeifion

    This blog is great, I just thought I should make the effort to post a comment to say that tips such as this are really good, really helpful and it’s appriciated that people such as yourself that know so much are so happy to share.

    You make the world a better place :)

  2. on 05 Nov 2007 at 6:36 pmAdam Sanderson

    Thanks for this post, no matter how much I use TextMate, I always find that there is an enormous amount I’m not aware of in there. Keep up these tips.

  3. on 06 Nov 2007 at 5:08 ammeekish

    Great tip. I didn’t know about the magnifying glass or the ctrl+esc shortcut. I’ll definitely be integrating those tips into my TextMating.

  4. on 06 Nov 2007 at 6:38 amScott Stevenson

    Johanna is indeed awesome if she suggested this. I second it.

  5. on 13 Nov 2007 at 11:02 pmPatrick

    Thanks for the tip about the bundle action menu. I always thought that there must be a key equivalent for this.


  6. on 30 Nov 2007 at 12:37 amCraig Anderson

    I just discovered a nifty little tip your readers may be interested in.

    In System Preferences, you can assign a hot key to open the selected file in the Finder in TextMate. To do this:

    1. First check that TextMate is in the Finder’s File > Open With menu. Select a file TextMate can open in the Finder and go to the File > Open With menu. Take note of the exact spelling of TextMate in this menu. On my Mac it’s, on your machine it may be TextMate.
    2. Open System Preferences, Keyboard and Mouse, then click the Keyboard Shortcuts tab
    3. Click the + icon at the bottom of the list of hot keys to define a new shortcut
    4. Select Finder as the Application
    5. Enter (or whatever you noted in step 1) as the menu title
    6. Pick a keyboard shortcut (I use command-E)

    There are a few quirks with this (you can’t open folders in TextMate, you must select at least one file that can be opened with TextMate), but I find it handy for opening HTML documents for editing.

  7. on 30 Nov 2007 at 12:53 amCiarán

    There is also Henrik’s Open in TextMate

  8. on 12 Apr 2010 at 10:03 pmfree life insurance quotes

    If the insured’s death is suspicious and the policy amount is large,the insurer may investigate the circumstances surrounding the death before deciding whether it has an obligation to pay the claim.

Fork me on GitHub