[TxMt] Re: Balancing parentheses near strings

cormullion at mac.com cormullion at mac.com
Wed Aug 9 06:55:48 UTC 2006


On 2006-08-09, at 01:21, Jacob Rus wrote:

> cormullion at mac.com wrote:
>> I can't figure this out...
>> 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. Also, no text is selected  
>> with the caret anywhere else.
>> How can I teach TextMate that parentheses between quotation marks  
>> shouldn't be considered for a match? I want something like "Ignore  
>> parentheses that are in strings" but i can't see how to do that...
>
> As far as I know, the select enclosing brackets command doesn't  
> know anything about scopes.  So you can't really do what you want I  
> don't think.

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:

{
     s = "Insert a brace: {"
}

> Incidentally, as a lisper, you should take a look at the extend  
> current parens command in the Experimental bundle.  It does some  
> neat stuff.

Thanks, I'll take a look.

--
(<http://newlisper.blogspot.com/>)



More information about the textmate mailing list