[TextMate] HTML attributes coloring?

Brian Lalor blalor at bravo5.org
Fri Oct 8 22:46:01 UTC 2004


On Oct 7, 2004, at 6:38 PM, bongoman wrote:

> Is it open to me to set HTML attributes to have a different color to
> the tag itself?

I think the HTML syntax highlighting already does that...

I've got the following in my XML.plist, which is copied in large part 
from HTML.plist:
                 /* nodes */
                 {
                         name = "nodes";
                         begin = "</?([-_a-zA-Z0-9]+)";
                         end = "(/?)>";
                         "elementFontStyle[1]" = ( underline );

                         foregroundColor = "#0066CC";

                         patterns = (
                                 { name = "Option"; match = " 
([a-zA-Z\-]+)"; },
                                 { name = "Double Quoted String"; begin 
= "\""; end = "\"";  foregroundColor = "#CC3300";},
                                 { name = "Single Quoted String"; begin 
= "'"; end = "'"; fontStyle = (  ); foregroundColor = "#CC3300"; },
                         );
                 },


That sets the tag to one color, keys to another, and values to a third.

Or was that not what you wanted?

-- 
    __   ____
   / /  / __/ Brian Lalor
  / _ \/__ \  blalor at bravo5.org
/_.__/____/  http://bravo5.org/



More information about the textmate mailing list