vscode C/C++ color theme 配色方案

vscode setting配置

在这里插入图片描述

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": [
                    "entity.name.function", // 函数
                    "keyword.operator.sizeof" // sizeof
                ],
                "settings": {
                    "foreground": "#1fd137",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "entity.name.type", // typedef 类型
                    "storage.type.built-in.primitive.c", //自带的类型
                    "storage.type", // struct关键字
                ],
                "settings": {
                    "foreground": "#3fccd1",
                    "fontStyle": "bold"
                }
            },
            {
                "scope": [
                    "variable.other.global", //全局变量
                ],
                "settings": {
                    "foreground": "#bd9924",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "entity.name.function.preprocessor", // 宏定义
                ],
                "settings": {
                    "foreground": "#971818",
                    "fontStyle": "italic bold"
                }
            },
            {
                "scope": [
                    "variable.other.local", // 局部变量
                    "variable.parameter", // 形参
                ],
                "settings": {
                    "foreground": "#00b7ff",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "variable.other.property", // 结构体的字段
                ],
                "settings": {
                    "foreground": "#1652c2",
                    "fontStyle": "bold"
                }
            },
            {
                "scope": [
                    // "keyword", // typedef
                    "keyword.control", // if, else, return
                    "storage.modifier", // const, static
                ],
                "settings": {
                    "foreground": "#ffff00",
                    "fontStyle": "italic"
                }
            },
            {
                "scope": [
                    "constant.numeric" // 数值
                ],
                "settings": {
                    "foreground": "#22daac",
                    "fontStyle": "italic"
                }
            },
        ],
    },

修改的方法

  1. 输入命令 inspect edit editor tokens and scopes,找到元素的scopes

在这里插入图片描述
2.移动鼠标到元素,找到实际生效的scopes以及其所属的scopes
在这里插入图片描述
3. 在setting中进行修改

            {
                "scope": [
                    // "keyword", // typedef
                    "keyword.control", // if, else, return, define
                    "storage.modifier", // const, static
                ],
                "settings": {
                    "foreground": "#ffffFF",
                    "fontStyle": "italic"
                }
            },

变成了白色
在这里插入图片描述

  • 6
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值