让你的VS Code性感起来,字体设置 |
您所在的位置:网站首页 › vscode字体大小设置 › 让你的VS Code性感起来,字体设置 |
之前一直用WebStorm编写代码,最近转到VS Code后,对WebStorm的斜体字样式念念不忘,由于本人是个颜值控,比较喜欢好看的字体,骚气的代码配色,所以想办法让VS Code也支持斜体字和连字符特性等, 连字符特性很好解决,只需一行设置即可: "editor.fontLigatures": true前提是你设置的编辑器当前字体要支持Font Ligatures特性,比如经典的Fira Code字体,以前非常迷这款字体,但是你们懂的,任何好看的东西,久了都会没新鲜感... 后来喜欢上了Operator Mono, 非常漂亮的字体, 本文图示所用字体采用的就是这款: 这个斜体配置,需要在自定义设置中添加如下配置项: "editor.tokenColorCustomizations": { "textMateRules": [ { "name": "italic font", "scope": [ "comment", "keyword", "storage", "keyword.control.import", "keyword.control.default", "keyword.control.from", "keyword.operator.new", "keyword.control.export", "keyword.control.flow", "storage.type.class", "storage.type.function", "storage.type", "storage.type.class", "variable.language", "variable.language.super", "variable.language.this", "meta.class", "meta.var.expr", "constant.language.null", "support.type.primitive", "entity.name.method.js", "entity.other.attribute-name", "punctuation.definition.comment", "text.html.basic entity.other.attribute-name.html", "text.html.basic entity.other.attribute-name", "tag.decorator.js entity.name.tag.js", "tag.decorator.js punctuation.definition.tag.js", "source.js constant.other.object.key.js string.unquoted.label.js", ], "settings": { "fontStyle": "italic", } }, ] },以上配置,对js中的一些关键字可以完美支持italic字体,如果不满足你的要求,可以尝试自己添加配置,配置名称的查找可以通过:⇧⌘P -> inspect the scopes 来实现,具体参考VS Code官方文档 所谓萝卜白菜各有所爱,不喜勿喷,同时欢迎大家留言交流。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |