Mario Michelli
Mario Michelli

Reputation: 543

How do I set the colour of a custom tag in html-mode

Trying to get a mode to work with silverstipe templates.

How do I set the background of the <% %> tag to be a darker color?

Upvotes: 0

Views: 141

Answers (2)

Drew
Drew

Reputation: 30698

According to your link, the face that highlights <% and %> is face font-lock-keyword-face.

If you want that face to be darker everywhere, then customize it, as @db48x suggested.

If you instead want to leave that face alone but have <% and %> be darker in silverstripe-mode then use a different, darker face in your font-lock-add-keywords expression. Use defface to define a new face, and use that.

Upvotes: 0

db48x
db48x

Reputation: 3178

You can customize any face using the customization system, but the trick is to know which face you have to edit to get the look that you want. There is a shortcut you can use in this case: position the point over the text in question and run M-x describe-face. This asks for a face name, but the default if you leave the input blank is the face used by the text at point. This gets you a help window with information about the face, including a link that takes you to its customization page.

Upvotes: 0

Related Questions