Dr Nic

TextMate easter egg: find bundle commands by key combo

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


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:

Related posts:

  1. Packaging TextMate bundles in OS X DMGs Last week Engine Yard released a CLI for their Engine...
  2. Validate and Save your Ruby in TextMate – with secret Rubinus superpowers In some TextMate bundles, if you save a file it...
  3. Using Ruby within TextMate snippets and commands I didn’t know you could run Ruby within TextMate snippets....
  4. How to yell at people with GitHub from TextMate Sometimes when you are perusing code you ask the question:...
  5. GitHub and TextMate Unite I wanted to go from a source file to the...

5 Responses to “TextMate easter egg: find bundle commands by key combo”

  1. leethal says:

    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 says:

    What’s the command to show up this window?

  3. Dr Nic says:

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

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

  5. Dr Nic says:

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