[TxMt] toggling pairs as in VI

Pete Becker pete at versatilecoding.com
Sun May 25 13:21:06 UTC 2008


On May 25, 2008, at 7:54 AM, Phil Schumm wrote:

> On May 25, 2008, at 12:11 AM, Peter Rossi wrote:
>> I realize that textmate implements automatic pairing of delimiters  
>> such as parentheses.  However, this does not prevent you from  
>> removing one of the paired parentheses etc during the editing  
>> process.  In vi, I would use "%" to toggle between open and close  
>> delimiters to debug syntax.  I can't find a similar feature in  
>> textmate.
>
>
> Have you noticed that when you "pass over" the closing paren/brace/ 
> bracket/quote, the opening one will blink?  By pass over, I mean  
> either (1) typing the closing character TextMate has already  
> inserted for you, or (2) using the arrow key to move right over the  
> closing character.  If you don't get a blink, then the closing paren/ 
> brace/bracket/quote is unmatched.  This won't help you if the  
> opening character is not on the screen, but works pretty well (IMO)  
> for double-checking on your way out of a complex, nested expression.
>

Another handy trick is Shift-Command-B, which selects the text between  
parens, etc. as well as the delimiters themselves. Repeating it  
expands to the next level of delimiters, etc.

   -- Pete

Roundhouse Consulting, Ltd.





More information about the textmate mailing list