Visual studio code 如何使我的vscode字体像升华一样倾斜?

Visual studio code 如何使我的vscode字体像升华一样倾斜?,visual-studio-code,sublimetext3,vscode-settings,Visual Studio Code,Sublimetext3,Vscode Settings,我在VScode和sublime中使用相同的字体(Consolas)。但在同一个地方它看起来不同: 以下是我的升华设置: { "auto_complete_selector": "source,text", "color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme", "font_f

我在VScode和sublime中使用相同的字体(Consolas)。但在同一个地方它看起来不同:

以下是我的升华设置:

{
    "auto_complete_selector": "source,text",
    "color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
    "font_face": "Consolas",
    "font_size": 12,
    "ignored_packages":
    [
    ],
    "theme": "Default.sublime-theme"
}
    "materialTheme.accent": "Blue",
    "editor.fontFamily": "Consolas, 'Courier New', monospace",
    "editor.fontWeight": 520,
    "editor.codeLensFontSize": 11,
    "editor.fontSize": 15,
    "editor.formatOnType": true,
    "debug.console.fontFamily": "Cascadia Mono",
    "python.showStartPage": false,
    "workbench.editorAssociations": [
        {
            "viewType": "jupyter.notebook.ipynb",
            "filenamePattern": "*.ipynb"
        }
    ],
    "explorer.confirmDelete": false,
    "todo-tree.tree.showScanModeButton": true,
    "editor.fontLigatures": true,
    "editor.tokenColorCustomizations": {
       "comments": "#7ea9eb"
    
以下是我的vscode设置:

{
    "auto_complete_selector": "source,text",
    "color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
    "font_face": "Consolas",
    "font_size": 12,
    "ignored_packages":
    [
    ],
    "theme": "Default.sublime-theme"
}
    "materialTheme.accent": "Blue",
    "editor.fontFamily": "Consolas, 'Courier New', monospace",
    "editor.fontWeight": 520,
    "editor.codeLensFontSize": 11,
    "editor.fontSize": 15,
    "editor.formatOnType": true,
    "debug.console.fontFamily": "Cascadia Mono",
    "python.showStartPage": false,
    "workbench.editorAssociations": [
        {
            "viewType": "jupyter.notebook.ipynb",
            "filenamePattern": "*.ipynb"
        }
    ],
    "explorer.confirmDelete": false,
    "todo-tree.tree.showScanModeButton": true,
    "editor.fontLigatures": true,
    "editor.tokenColorCustomizations": {
       "comments": "#7ea9eb"
    
我的问题是:如何使我的vscode字体像升华一样倾斜?

根据,您可以使用
编辑器自定义主题颜色。tokenColorCustomizations
规则在您的用户设置中:

{
    "auto_complete_selector": "source,text",
    "color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
    "font_face": "Consolas",
    "font_size": 12,
    "ignored_packages":
    [
    ],
    "theme": "Default.sublime-theme"
}
    "materialTheme.accent": "Blue",
    "editor.fontFamily": "Consolas, 'Courier New', monospace",
    "editor.fontWeight": 520,
    "editor.codeLensFontSize": 11,
    "editor.fontSize": 15,
    "editor.formatOnType": true,
    "debug.console.fontFamily": "Cascadia Mono",
    "python.showStartPage": false,
    "workbench.editorAssociations": [
        {
            "viewType": "jupyter.notebook.ipynb",
            "filenamePattern": "*.ipynb"
        }
    ],
    "explorer.confirmDelete": false,
    "todo-tree.tree.showScanModeButton": true,
    "editor.fontLigatures": true,
    "editor.tokenColorCustomizations": {
       "comments": "#7ea9eb"
    
  • 打开您的
    settings.json
    并首先添加以下规则(将
    此处的主题名
    替换为您的颜色主题名):

    “editor.tokenColorCustomizations”:{
    “[您的主题名称在此]”:{
    “文本材料”:[]
    }
    }
    
  • 打开您选择的Python文件。然后,使用Ctrl+Shift+P打开命令调色板,并运行“开发人员:检查编辑器标记和范围”

  • 点击你想要的关键字,使其斜体。例如,我们单击
    class
    关键字查看其TextMate范围。复制突出显示的第一个TextMate作用域ID:

  • 返回您的
    设置.json
    。在
    textMateRules
    数组中,插入一个新对象,其
    scope
    属性是您刚才复制的TextMate scope ID

    “editor.tokenColorCustomizations”:{
    “[您的主题名称在此]”:{
    “文本材料”:[
    {
    “范围”:“storage.type.class.python”,
    “设置”:{
    “字体样式”:“斜体”
    }
    }
    ]
    }
    }
    
  • 保存您的
    设置.json
    ,您将看到斜体的
    键盘

  • 注 您可以在
    textMateRules
    数组中附加更多对象,以使字体斜体显示更多关键字。例如:

    “editor.tokenColorCustomizations”:{
    “[您的主题名称在此]”:{
    “文本材料”:[
    {
    “范围”:“variable.parameter.function.language.special.self.python”,
    “设置”:{
    “字体样式”:“斜体”
    }
    },
    {
    “范围”:“storage.type.class.python”,
    “设置”:{
    “字体样式”:“斜体”
    }
    }
    ]
    }
    },
    
    使用不同的主题,如
    冬季即将来临
    ,或使用TextMate ScopesHanks定制当前主题提示,这正是我想要的@Riov8您能提供您的配色方案名称吗?谢谢vscode主题是
    材料
    ~@AnsonH