4

Is there a way to go to a matching brace in TextMate 1.5?

I can't just collapse the block because it's a badly formatted file, but the matching brace might be successfully recognized anyway. I just need to go to it (since it's distant more than 1-screen).

o0'.
  • 11,739
  • 19
  • 60
  • 87

1 Answers1

4

In TextMate 1.x you can select the contents of the surrounding braces using ⇧⌘B. After this you can use the arrow keys to go the start/end of the selection. You could record a macro to make this a single action.

In TextMate 2 going to matching brace can be done with ⌃↑ and ⌃↓. These keys can also be used with shift () to select to matching brace.

Allan Odgaard
  • 464
  • 2
  • 2
  • 5
    Allan, unfortunately on recent OS X versions the bindings for TM2 are reserved on the OS level, for Mission Control and Application Windows. Is it possible to make a "Find matching brace" shortcut that will essentially jump to the highlited match? It would be extremely useful e.g. when editing JavaScript callback hell. – MaratC Feb 23 '15 at 13:58
  • Is there anything that can be combined with the mouse? For example in Xcode, double-clicking a brace will select to the matching brace, which is extremely convenient. – lensovet Feb 06 '16 at 08:30
  • You can turn off the Mission Control/App window bindings to get this insanely helpful feature to work. Go to `System Prefs > Mission Control` and toggle off the `⌃↑` and `⌃↓`. Almost lost me to Sublime Text! @MaratC – elbowlobstercowstand Apr 04 '16 at 21:04