Modifiying Sublime Text Syntax Highlighting for HTML Tags

Viewed 3358

I've tried numerous colour schemes for Sublime Text 2 and I've found a number that look great for javascript and php, but they also have terrible distinction between text and tags in HTML.

What I'm looking to do is make HTML tags the same colour as the beginning and end tag (<>). Right now the left and right chevrons appear the same colour as plain text, which can be dizzying to read.

Bad syntax colouring in "Frontier" Colour scheme Frontier

Realizing it's not the colour scheme but the syntax definitions for HTML, I looked in ~/Library/Application Support/Sublime Text 2/Packages/HTML/HTML.tmLanguage to make the modification.

Problem is, the XML file is littered with &gt; and &lt; and no documentation for the file itself other than the unofficial documentation for syntax definitions. Anyone know how I could merge the beginning and end tag definitions to be the same as the tags themselves?

The other option, of course, it to edit each theme I like and make sure the tags and the chrevrons are coloured the same, but I figured a global edit would make more sense in my case.

Better syntax highlighting in "Phoenix Dark Blue" Colour scheme Phoenix Dark Blue

For example, Phoenix Dark Blue solves this problem by using the following definition,

<dict>
    <key>name</key>
    <string>Variable, String Link, Tag Name</string>
    <key>scope</key>
    <string>variable, support.other.variable, string.other.link, entity.name.tag, entity.other.attribute-name, meta.tag, declaration.tag</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#787878</string>
    </dict>
</dict>
2 Answers
Related