Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code 三重引号Python docstring的TextMate作用域_Visual Studio Code_Syntax Highlighting_Textmate_Vscode Settings_Docstring - Fatal编程技术网

Visual studio code 三重引号Python docstring的TextMate作用域

Visual studio code 三重引号Python docstring的TextMate作用域,visual-studio-code,syntax-highlighting,textmate,vscode-settings,docstring,Visual Studio Code,Syntax Highlighting,Textmate,Vscode Settings,Docstring,我目前正在为Python开发设置VS代码。我希望将三重引用的docstring突出显示为注释,而不是字符串,即在此图片中为灰色而不是浅绿色: 我知道我可以在这个主题的TextMate规则中对此进行调整,但我无法为Python DocString找出正确的范围。我想我会是这样的: "editor.tokenColorCustomizations": { "[Predawn]": { "comments": "#777777", "textMateRules"

我目前正在为Python开发设置VS代码。我希望将三重引用的docstring突出显示为注释,而不是字符串,即在此图片中为灰色而不是浅绿色:

我知道我可以在这个主题的TextMate规则中对此进行调整,但我无法为Python DocString找出正确的范围。我想我会是这样的:

"editor.tokenColorCustomizations": {
    "[Predawn]": {
        "comments": "#777777",
        "textMateRules": [
            {
                "scope": "string.quoted.triple",
                "settings": {
                    "foreground": "#777777"
                }
            }
        ]
    },
}

但是,即使在重新启动编辑器之后,这也没有达到预期效果。有人知道什么是正确的范围吗?

只需扩展上面的注释,范围是:

对于docstrings:string.quoted.docstring.multi.python For'or.single For'

对于非docstring的三引号字符串:string.quote.multi.python


不使用范围字符串.quote.triple,即使它出现在settings.json autocomplete中。

来自命令面板开发人员:Inspect TMScopes@Alex我应该如何理解这个?string.quoted.docstring.multi?谢谢,这确实显示了当前突出显示的代码的范围。