【发布时间】:2020-04-09 11:04:08
【问题描述】:
我有一个相当长的 XML 文档,我希望某些标签以某种颜色显示(例如每个标签都应该是红色的) 在 Visual Studio 中是否有插件或方法可以做到这一点代码?
【问题讨论】:
-
使用扩展HighLight marketplace.visualstudio.com/…
标签: xml visual-studio-code vscode-settings color-scheme
我有一个相当长的 XML 文档,我希望某些标签以某种颜色显示(例如每个标签都应该是红色的) 在 Visual Studio 中是否有插件或方法可以做到这一点代码?
【问题讨论】:
标签: xml visual-studio-code vscode-settings color-scheme
使用命令面板中的scopes inspector,您将看到 xml 标记具有以下范围:
entity.name.tag.localname.xml
meta.tag.xml
text.xml
因此,将其放入您的设置中会改变您的标签颜色:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "entity.name.tag.localname.xml",
"settings": {
"foreground": "#f00",
// "fontStyle": "underline"
}
}
}
【讨论】: