如何在HTML模式下设置自定义标签的颜色 [英] How do I set the colour of a custom tag in html-mode

查看:459
本文介绍了如何在HTML模式下设置自定义标签的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试获得使用银色模板的模式。

如何将<%%>标签的背景设置为较暗的颜色?

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

推荐答案

根据您的链接,突出显示<%%> 的脸是 font-lock-keyword-face

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

如果您希望所有的脸都变暗,那么请自定义它,如@ db48x所建议的。

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

如果你想单独离开这张脸,但有<%% < / code>在 silverstripe-mode 中更暗,然后在 font-lock-add-keywords中使用不同的较暗的脸表达式。使用 defface 来定义一个新面孔,并使用它。

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.

这篇关于如何在HTML模式下设置自定义标签的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆