TextMate easter egg: find bundle commands by key combo

Posted by Dr Nic on October 09, 2008

I’ve dreamed of the ability to ask TextMate “what frigging bundle command/snippet is being activated by Ctrl+P or Shift+Ctrl+G?” I’ve silently pined for it. (Answer: params[:id] in Rails, and all the Git bundle commands, respectively).

Really I’m an idiot because the correct thing to do is to ask on ##textmate, “is there a way to …?” but because I figured I knew everything about TextMate I just assumed you couldn’t search for bundle commands by their key combo.

I was pairing with chendo and he had obviously stopped listening to me monologuing about how to do TDD with Shoulda and was randomly clicking things on TextMate.

He found the following:

Find bundle items by key binding

Find bundle items by key binding

Gold.

Updated image

Comments suggest that “what to do” isn’t clear above. My bad.

To get this working, there are 3 steps:

  1. Press Ctrl+Cmd+To to bring up the “Select Bundle Item” box. This feature of Textmate is awesome. You can enter the text of a bundle item and it will try to find what you are looking for.
  2. Click the magnifying glass
  3. Select ‘Key equivalent’

And here’s a picture:

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. leethal Thu, 09 Oct 2008 16:00:43 UTC

    Nice one!

    (Except that binding a command to ctrl + P sucks, as that’s what I use instead of the up arrow key. You know, the emacs-like navigation almost all OS X apps, including TextMate, supports.)

  2. miguel baldi Thu, 09 Oct 2008 23:51:07 UTC

    What’s the command to show up this window?

  3. Dr Nic Fri, 10 Oct 2008 06:27:46 UTC

    @Miguel - ah sorry. You click the magnifying glass to see the popup menu.

  4. Nick Quaranto Fri, 17 Oct 2008 04:26:01 UTC

    How exactly does one get to this menu? Where’s the magnifying glass? Perhaps a screenshot would help the confused.

  5. Dr Nic Fri, 17 Oct 2008 04:38:46 UTC

    @Nick, ok I’ve updated the article on the 3 steps to make this work. Sorry for the hassle.

Comments