在Visual Studio代码自定义主题中设置引号的颜色

时间:2017-08-03 19:48:35

标签: visual-studio-code vscode-extensions tmlanguage

我正在使用vscode自己定制的主题,我基于另一个主题。目前这样的文字显示为白色:

  

“”“一些Python评论”“”

我想更改颜色,但无法找到要更改的正确属性。我尝试在*.tmTheme文件中添加它,但它不会改变任何内容:

<dict>
    <key>name</key>
    <string>Quotes</string>
    <key>scope</key>
    <string>markup.quote</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#F77669</string>
    </dict>
</dict>
你可以帮忙吗? 非常感谢你提前!

1 个答案:

答案 0 :(得分:3)

正确的tmLanguage范围名称为 string.quoted.docstring.multi.python

使用Developer: Inspect TM scopes命令很容易找到:

我在另一个答案here中更详细地写了关于tmLanguage范围名称。

以下内容适用于我.tmTheme(与您的示例相比,我只更改了<string>键后的scope):

<dict>
    <key>name</key>
    <string>Quotes</string>
    <key>scope</key>
    <string>string.quoted.docstring.multi.python</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#F77669</string>
    </dict>
</dict>

相关问题