vscode自定义颜色配置

1.打开setting.json

位置:

1)在vscode界面中打开

打开 文件 ==>> 首选项 ==>> 设置

右上角,点击图标在这里插入图片描述

在这里插入图片描述

在配置目录中打开

vim ~/.config/Code/User/settings.json

2.我的配置文件

{   
    
    "files.associations": {
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript"
    },
    "emmet.includeLanguages": {
        "wxml": "html"
    },
    "minapp-vscode.disableAutoConfig": true,
    "editor.renderIndentGuides": false,
    "editor.autoClosingBrackets": "always",
    "editor.autoClosingQuotes": "always",
    "files.autoSave": "afterDelay",
    "editor.minimap.enabled": true,
    "breadcrumbs.enabled": true,
    "editor.mouseWheelZoom": true,
    
    
    "codegnuglobal.executable": "/usr/bin/global",  
    "codegnuglobal.autoupdate": false, 

    "update.enableWindowsBackgroundUpdates":true,
    "background.enabled":true,
    "background.customImages": [""],

    "background.style": {
        "content": "''",
        "pointer-events": "none",
        "position": "absolute",
        "z-index": "99999",
        "width": "100%",
        "height": "100%",
        "background-position": "100% 100%",
        "background-repeat": "no-repeat",
        "opacity": 0.2
    },
    "background.useFront": true,
    "background.useDefault": false,
    "git.ignoreMissingGitWarning": true,
    "editor.fontFamily": "Consolas, mononoki,'Courier New', monospace",
    "editor.renderLineHighlight": "none",
    "editor.lineHeight": 16,
    "editor.roundedSelection": true,
    "editor.fontSize": 14,
    "editor.fontWeight": "bold",
    "terminal.integrated.fontSize": 14,
    "terminal.integrated.fontWeight": "bold",
    "workbench.colorCustomizations": {
        "[Visual Studio Dark]":{
            "editor.foreground": "#ffffff",
            "editor.background": "#242222",
            "editor.selectionBackground":"#b9b9b946",
            //"editor.selectionHighlightBorder": "#bdbdbd",
            //"editorHint.border": "#ff0000",
            //"editorInfo.border": "#ff0000",
            //"editorGroup.border": "#ff0000",
            //"diffEditor.border": "#ff0000",
            //"tab.border": "#ff0000",
            
            "panel.border": "#adb3e9",
            //"panelInput.border": "#ff0000",
            //"panelInput.border": "#ff0000",
            //"focusBorder": "#ff0000",
            //"input.border": "#ff0000",
            //"merge.border": "#ff0000",
            //"button.border": "#ff0000",
            "contrastBorder": "#ffffff", //边框颜色
            "debugToolBar.border": "#ff0000",
            "terminal.border": "#ff0000",
            "terminal.background": "#020202",
            "terminal.foreground": "#ffff",
            
            
            //"editor.selectionHighlightBorder": "#f8f8f000",
            "editor.selectionHighlightBackground": "#b9b9b946",
            "editor.selectionForeground": "#f1eded",
            //"editorIndentGuide.activeBackground":"#81868d",
            "editorBracketMatch.background": "#8b747471",
            //"editorBracketMatch.border": "#ff0000",
            //"tab.activeBackground": "#0b051ab2",
            "textLink.foreground": "#d6561ac4",
            //"descriptionForeground": "#ff0000",
            "selection.background": "#ff0000",
            //"textBlockQuote.background":"#b89a9a",
            //"textSeparator.foreground": "#86c2df"
            
            
        },
        
        
    },
    "editor.tokenColorCustomizations": {
        "[Visual Studio Dark]":{
            "comments": "#00effb",
            "types": "#FF0000",
            //"strings": "#0bf01e",
            "functions": "#f2f600",
            "keywords": "#48ff00",
            //"variables":"#3e3e4100",
            //"numbers": "#948faf73",
            
            
            "textMateRules": [
                {
                    "scope": ["markup.italic.markdown", "markup.bold.markdown"],
                    "settings": {
                       "fontStyle": "italic"
                    }
                },
                {
                    "name": "Comment",
                    "scope":[
                        "comment" 
                    ],
                    "settings": {
                        "foreground": "#00ffff",
                        "fontStyle": "italic bold"
                    }
                },
                {
                    "name": "[VSCODE-CUSTOM] PHP Punctuation Variable Definition",
                    "scope": "punctuation.definition.variable.php",
                    "settings": {
                        "foreground": "#e57373",
                        "fontStyle": "bold"
                    }
                },
                {
                    "name": "String",
                    "scope":[
                        "string"
                    ],
                    "settings": {
                        "foreground": "#32a504",
                        "fontStyle": ""
                    }
                },
                {
                    "name": "HTML:Tags",
                    "scope":[
                        "meta.tag",
                        "punctuation.definition.tag.html",
                        "punctuation.definition.tag.begin.html",
                        "punctuation.definition.tag.end.html"
                    ],
                    "settings": {
                        "foreground": "#4d4242",
                        "fontStyle": ""
                    }
                },
                {
                    "name": "HTML:Tag Names",
                    "scope":"entity.name.tag",
                    "settings": {
                        "foreground": "#a617e9",
                        "fontStyle": "bold"
                    }
                },
                {
                    "name": "HTML: Attribute Names",
                    "scope": [
                        "meta.tag entity.other.attribute-name",
                        "entity.other.attribute-name.html"
                    ],
                    "settings": {
                        "fontStyle": "italic",
                        "foreground": "#f31616"
                    }
                },
                {
                    "name": "Operator",
                    "scope":"keyword.operator",
                    "settings": {
                        "foreground": "#e21d1d",
                        "fontStyle": ""
                    }
                },
                {
                    "name": "terminal",
                    "scope":"string.quoted.triple",
                    "settings": {
                        "foreground": "#FF0000",
                        "fontStyle": "bold"
                    }

                }
                
            ]
        }
    },
    "workbench.colorTheme": "Visual Studio Dark",
    "window.zoomLevel": 1,
    "workbench.sideBar.location": "right",
}
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在VS Code中,可以通过修改setting.json文件来配置字体颜色。首先打开VS Code,然后按下Ctrl + Shift + P(Windows)或Cmd + Shift + P(Mac)来打开命令面板。在命令面板中输入“Preferences: Open Settings (JSON)”,选择并点击该选项来打开setting.json文件。 在setting.json文件中,可以添加以下内容来修改字体颜色配置: ``` "editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "comment", "settings": { "foreground": "#ff0000" //设置字体颜色为红色 } } ] } ``` 上述配置中,通过"scope": "comment"指定了注释的范围,在"settings"中可以设置字体的样式(如"fontStyle": "italic"设置为斜体)和颜色(如"foreground": "#aa00ee"设置为紫色)。 在这个配置中,你可以根据自己的喜好和需求,自定义注释的字体颜色。注意,这个配置只会影响注释的字体颜色,其他部分的字体颜色仍然保持默认设置。 希望以上信息能对你有所帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [VS Code 修改字体颜色](https://blog.csdn.net/woyaoyonghanzizhuce/article/details/82260999)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [VSCode改变字体颜色](https://blog.csdn.net/weixin_39874463/article/details/116272187)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值