[TxMt] Highlight Parentheses Pairs

thomas Aylott thomas.42 at gmail.com
Fri Apr 7 15:55:13 UTC 2006


On Apr 6, 2006, at 4:28 PM, Charilaos Skiadas wrote:

>> On 6/4/2006, at 21:46, Daniel Harple wrote:
>>
>>> In emacs there is an option to highlight parentheses pairs when  
>>> your caret is on a parenthesis -- show-paren. Can a similar  
>>> effect be achieved in TextMate? [...]
>>
>> Currently not.
>
> However, you could add different colors to the braces etc for  
> different nesting levels, to get permanent highlighting of matching  
> braces, by using an appropriate scope selector. Not the same I  
> know, but something.
>
> Perhaps when dynamic scopes arrive?

In a few of my languages I have something like this:

		round-brackets = { patterns = (
				{	name = 'meta.group.braces.curly';
					begin = '\{';
					end = '\}';
					patterns = ( { include = 'source.prototype.js.bracketed'; } );
				},
				{	name = 'meta.group.braces.round';
					begin = '\(';
					end = '\)';
					patterns = ( { include = 'source.prototype.js.bracketed'; } );
				},
			);
		};

You could rework that to color just the brackets themselves.
But that would be permanent for that theme.

thomas Aylott—subtleGradient—oblivious at subtleGradient.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060407/fd394a4c/attachment.html>


More information about the textmate mailing list