visual-studio-code - 更改 VS Code 中注释周围字符的颜色

标签 visual-studio-code vscode-settings

如何更改 vs 代码中注释前后字符的颜色。我正在谈论或/* */或 # 字符。
我知道如何更改评论颜色

How do I change color of comments in visual studio code?

但找不到有关“框架”字符的任何信息。

最佳答案

你可以很简单地做到这一点。在命令面板中使用“Inspect TM Scopes”来检查这些字符。它将为每种语言提供不同的范围,例如:

punctuation.definition.comment.js

用于 javascript 注释。现在您可以在您的用户设置中使用它,如下所示:
"editor.tokenColorCustomizations": {
    "textMateRules": [

      {
        "scope": "punctuation.definition.comment.js",
        "settings": {
          "foreground": "#f00",
        }
      }
   ]
}

对于其他语言,您显然会有不同但相似的范围。

并查看添加到 How to change VisualStudioCode comment color with it's slashes? 的简短回答关于 可能 计划解决这个问题 在 2019 年 10 月的版本中。所以标点符号不必单独着色。 [现在已在 Insider's Build 中修复。]

关于visual-studio-code - 更改 VS Code 中注释周围字符的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52174690/

相关文章:

visual-studio-code - VS代码: change font size of menu bars?

javascript - 为什么我的 ESlint 在保存时没有格式化?

javascript - VS Code 编辑器删除 .click() 函数文本 #jQuery

javascript - VSCode Linter ES6 ES7 Babel linter

javascript - 如何在 VSCode 和 WebStorm 中将 CSS/SCSS/PostCSS 写入 React .tsx 文件作为 JavaScript 字符串?

visual-studio-code - VSCode 和 ES6 警告

python - VS Code Python 单元测试 "No tests ran"

android - flutter 错误sdkmanager错误!!! Windows 10

python - 在 VS Code 中,我不想让 Black 格式化我的 settings.json

visual-studio-code - 如何在 VSCode 中定义全局启动配置