[TxMt] Basic custom coloring

Scott Stevenson sstevenson at mac.com
Wed Feb 22 09:55:41 UTC 2006


I'm trying to get what seems like a simple custom coloring rule  
working. As a simple test, I just want to set a custom color for all  
characters between <code> and </code>.

I added this to the HTML language definition:

{    name = 'markup.code.html';
             begin = '<(code)>';
             end = '</(code)>';
             captures = { 1 = { name = 'entity.name.tag.html'; }; };
             patterns = ( { include = '$self'; } );
         },

I then went into the Fonts & Colors panel and set a custom color for  
the scope markup.code.html, but I don't see any effect.

I read Allan's blog post on scopes and it really seems like the above  
should work, but I'm finding a lot of conflicting information on this  
topic. The wiki mentions a number of things are out of date so I'm  
not sure where the authoritative docs are. The blog? The wiki? If so,  
which page?

The full explanation of scope is useful (assuming it's up to date),  
but it would be really nice to have some simple, practical examples  
just to get started. I believe instant gratification as a strong  
motivator for further research.  :)

Thanks!

    - Scott



More information about the textmate mailing list