Sublime Forum

Bold HTML Tags in any theme

#1

Hello there,

I’ve search the whole world wide web but I can’t find any answer for this. I simply want in HTML (and CSS if possible) to have bold opening and closing tags.
The tags then would stand out from the content inside. How can I tweak my theme in order to achieve that?

example photo

Many thanks

0 Likes

Different comment in c
#2

If you put the insertion point into a tag name, and press ctrl+alt+shift+p (show scope name), it shows you that it’s entity.name.tag.inline.any.html. This means that if you look in your color scheme file for “entity.name.tag”, you can make it be bold by changing the fontStyle. (Basically it’s finding the closest match in the color scheme file, so in the color scheme entity.name.tag will override anything that entity.name says, which overrides entity.)

The easiest way to get to the color scheme file, incidentally, is with PackageResourceViewer: github.com/skuroda/PackageResourceViewer. Pull up the command palette, go to Package Resource Viewer: Open Resource, then Color Scheme - Default, then whatever color scheme you’re using. Edit and save and the change should be immediate.

0 Likes