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

后端 未结 9 2157
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 10:29

I went through https://code.visualstudio.com/docs/getstarted/theme-color-reference but can\'t seem to find the setting for changing the comment color.

I am currentl

相关标签:
9条回答
  • 2020-11-27 11:13

    To change VS Code comment color

    File --> Preferences --> Settings

    Choose the "Workspace Settings" tab to only change it for this project
    Choose the "User Settings" tab to change it for all projects

    Do a search for "settings.json" and look for an option to "Edit in settings.json"

    Insert this color setting for the comments somewhere inside the curly brackets:

      "editor.tokenColorCustomizations": {
        "comments": "#ff4"
      }

    It might complain that you are overriding your current color theme, just ignore that.

    If there is already a section for "editor.tokenColorCustomizations" then just add the line to specify the comment color.

    0 讨论(0)
  • 2020-11-27 11:14

    Like Mark said, but add in the "scope": after "comment"

    "punctuation.definition.comment"

    to color also the punctuation,

    e.g. (// in javescript | /* */ in css | <!-- --> in html).

    "scope": ["comment", "punctuation.definition.comment"]
    
    0 讨论(0)
  • 2020-11-27 11:20

    You can modify your VS code by simply edit your setting file in VS code and follow these 3 steps.

    step1:

    step2:

    Step3:

    0 讨论(0)
提交回复
热议问题