[TxMt] Re: Balancing parentheses near strings

Allan Odgaard throw-away-1 at macromates.com
Sun Aug 13 23:22:02 UTC 2006

On 9/8/2006, at 8:55, cormullion at mac.com wrote:

>>> Here's some text:
>>> (this is a parenthesis in quotes "(")
>>> If I put the caret before or after the final quotation and choose  
>>> Select>Enclosing Brackets, TextMate selects the second opening  
>>> parenthesis and the closing parenthesis [...] That's a surprise.  
>>> I'll have problems if TextMate can't handle this situation.  
>>> Presumably this would show the same behaviour in another language:

Yes, the problem can be found in many situations, however, handling  
it properly requires AI for many cases. E.g. you often put \( in a  
regexp, 1) in prose, etc.

It can’t just skip strings (and comments) as these might include  
structured text themselves for which the user need the functionality  
-- but I do ponder about making it more scope based.

More information about the textmate mailing list