注释容易混淆?修改vscode注释颜色,自定义你的专属颜色
-
按
Ctrl+,
打开设置,搜索 "token color" → 点击 "Edit in settings.json"
-
添加以下配置(以绿色注释为例):
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment.line", // 单行注释(如 //)
"settings": {
"foreground": "#00FF00", //在这儿改你想要的颜色
"fontStyle": "italic"
}
},
{
"scope": "comment.block", // 多行注释(如 /* */)
"settings": {
"foreground": "#00AA00", //在这儿改你想要的颜色
"fontStyle": "italic"
}
}
]
}
常用颜色代码:
-
浅灰色:
#999999
-
绿色:
#00FF00
或#4EC9B0
-
蓝色:
#569CD6
-
紫色:
#C586C0