Visual studio code Visual Studio代码-自定义特定html标记的颜色
在上下搜索之后,我似乎无法找到如何在VisualStudio代码中自定义特定html标记的颜色。通过以下textmate作用域,更改它们的颜色非常简单: entity.name.tag.html 这将更改所有标记。但是,如果您只想更改“表单”标记的颜色,该怎么办?i、 e.Visual studio code Visual Studio代码-自定义特定html标记的颜色,visual-studio-code,Visual Studio Code,在上下搜索之后,我似乎无法找到如何在VisualStudio代码中自定义特定html标记的颜色。通过以下textmate作用域,更改它们的颜色非常简单: entity.name.tag.html 这将更改所有标记。但是,如果您只想更改“表单”标记的颜色,该怎么办?i、 e. 例如,如何使“Form”标记的颜色与“Div”标记的颜色不同 检查VSC中的编辑器标记/范围,我可以看到以下范围: meta.tag.structure.form.start.html 但这改变了其他一些东西,而不是表单标签
例如,如何使“Form”标记的颜色与“Div”标记的颜色不同
检查VSC中的编辑器标记/范围,我可以看到以下范围:
meta.tag.structure.form.start.html
但这改变了其他一些东西,而不是表单标签本身。不确定为什么它不适合您?这对我很有用:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "meta.tag.structure.form.start.html entity.name.tag, meta.tag.structure.form.end.html entity.name.tag",
"settings": {
"foreground": "#00ff00",
"fontStyle": "bold"
}
},
]
},
请注意,我必须向每个范围选择器添加entity.name.tag
,才能使其正常工作。演示:
您还想做些什么吗?使用扩展名
突出显示
效果很好,谢谢!这是完整的url:也可以,谢谢。添加“entity.name.tag”是重要的缺失位。这就是我需要完成的全部任务。