HBuilderX 开发工具,主题自定义, 代码颜色自定义

找到HBuilderX 开发工具安装目录,依次找到代码颜色配置文件(json文件)修改

配置字段参考:Scope Naming – Sublime Text Documentation

自己本地的存放路径

我的配置:

1.基于深色主题进行修改,所以需要在编辑器其工具中将主题切换为酷黑
2.替换dark_default.json中的tokenColors字段
3.博客底部有效果图~
"tokenColors": [
                {
                    "name": "keyword", //关键字
                    "scope": "keyword",
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#ff0000"
                    }
                },
                {
                    "name": "control entity", //控制
                    "scope": [
                        "keyword.control",
                        "constant.character.entity",
                        "punctuation.definition.entity"
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#ff00ff"
                    }
                },
                {
                    "name": "comment", //注释
                    "scope": "comment",
                    "settings": {
                        "fontStyle": "italic",
                        "foreground": "#a64b00"
                    }
                },
                {
                    "name": "comment definition", //注释符号
                    "scope": "punctuation.definition.comment",
                    "settings": {
                        "fontStyle": "italic",
                        "foreground": "#a64b00"
                    }
                },
                {
                    "name": "comment keyword", //注释关键字
                    "scope": "comment.conditional.keyword",
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#ff00ff"
                    }
                },
                {
                    "name": "comment defined",//注释常量
                    "scope": "comment.conditional.define",
                    "settings": {
                        "fontStyle": "bold underline",
                        "foreground": "#ff0000"
                    }
                },
                {
                    "name": "string", //字符串
                    "scope": [
                        "string",
                        "meta.structure.dictionary.json string.quoted.double.json"
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#fff200"
                    }
                },
                {
                    "name": "constant", //常量
                    "scope": [
                        "meta.preprocessor",
                        "string.regexp", //正则
                        "constant.numeric", //数字
                        "constant.language" //boolean值、空值
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#AE81FF"
                    }
                },
                {
                    "name": "variable", //变量
                    "scope": "variable",
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#0ed145"
                    }
                },
                {
                    "name": "variable readwrite", //自定义变量
                    "scope": "variable.other.readwrite",
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#c4ff0e"
                    }
                },
                {
                    "name": "variable constant", //自定义常量
                    "scope": "variable.other.constant",
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#409eff"
                    }
                },
                {
                    "name": "function name", //函数名称
                    "scope": ["support.function", "entity.name.function"],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#66ccff"
                    }
                },
                {
                    "name": "function prop",//函数参数
                    "scope": [
                        "variable.parameter", // 函数参数
                        "variable.language" // 函数this
                    ],
                    "settings": {
                        "fontStyle": "bold",
                        "foreground": "#ff7f27"
                    }
                },
                {
                    "name": "storage",//保留字
                    "scope": ["storage.type", "storage.modifier"],
                    "settings": {
                        "fontStyle": "italic",
                        "foreground": "#2979ff"
                    }
                },
                {
                    "name": "support",//第三方支持
                    "scope": [
                        "support",
                        "support.class",
                        "entity.name.type",
                        "entity.name.class",
                        "entity.name.namespace",
                        "entity.name.scope-resolution",
                        "entity.other.inherited-class"
                    ],
                    "settings": {
                        "fontStyle": "bold",
                        "foreground": "#409EFF"
                    }
                },
                {
                    "name": "property",//属性
                    "scope": [
                        // html属性名
                        "entity.other.attribute-name",
                        // object属性名
                        "variable.other.member",
                        "meta.object-literal.key"
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#00dddd"
                    }
                },
                {
                    "name": "property-value",//属性值
                    "scope": [
                        // css属性值
                        "meta.property-value",
                        "support.constant.property-value"
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#00e500"
                    }
                },
                {
                    "name": "tag",//标签
                    "scope": [
                        // html标签
                        "meta.tag",
                        "entity.name.tag",
                        "punctuation.definition.tag",
                        "punctuation.definition.tag.begin",
                        "punctuation.definition.tag.end"
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#409eff"
                    }
                },
                {
                    "name": "selector",//选择器
                    "scope": [
                        // css选择器
                        "meta.selector",
                        "entity.other.attribute-name"
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#00dddd"
                    }
                },
                {
                    "name": "tag selector",//标签选择器
                    "scope": [
                        // css标签选择器
                        "entity.name.tag.css"
                    ],
                    "settings": {
                        "fontStyle": "bold underline",
                        "foreground": "#409EFF"
                    }
                },
                {
                    "name": "css property",//css属性
                    "scope": [
                        // css属性名
                        "meta.property-name",
                        "support.type.property-name"
                    ],
                    "settings": {
                        "fontStyle": "",
                        "foreground": "#409EFF"
                    }
                }
]

效果图 :

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

  • 8
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值