[TxMt] Bug-report + feature request

Paul McCann paul.mccann at adelaide.edu.au
Tue Jun 13 23:32:29 UTC 2006

  Milen wrote:

> While I'm at this may I ask if it's possible to highlight the  
> matching bracket if your cursor is either before/after a curly  
> bracket because currently I have to go back then forwards to see  
> the matching bracket.

There's a helpful "Edit => Select => Enclosing  Brackets"  command  
that can be useful in this sort of situation. (Well, if you're  
*inside* a bracketed section.)

On a bit of a tangent... Armed with the above command you can invent   
"Go  to start of bracketed chunk/Go to end of bracketed chunk"  
commands that also work if you're to the left of the bracket. For  
example, if you want the cursor to end up to the left of the closing  

Start Macro Recording
Arrow right
Edit => Select => Enclosing  Brackets   (or command-shift-b)
Arrow right
Arrow left
Stop Macro Recording
Save Scratch Macro (as, say, "brackdown")

[In case it's not clear: the first arrow right takes you inside the  
starting bracket in the case where you're just to the left of it.]

Maybe save with something like control-option-d. Do the opposite  
thing for selecting the opening bracket;

Start Macro Recording
Arrow left
Edit => Select => Enclosing  Brackets   (or command-shift-b)
Arrow left
Arrow right
Stop Macro Recording
Save Scratch Macro (as, say, "brackup", key equiv control-option-u)

Adjust as necessary... Obviously it's a bit of a hack (and I'll not  
be the slightest bit shocked if someone points out a built-in way to  
do this), but it pretty much does what's advertised unless your  
bracket pair is {}. But in that case I have great faith that you can  
find the matching pair! Anyway, sorry if this whole post has little  
to do with your original question...


More information about the textmate mailing list