基础主题
文件 > 首选项 > 颜色主题 > Monokai
自定义修改
找到Microsoft VS Code
esourcesappextensions heme-monokai hemesmonokai-color-theme.json
文件备份,在tokenColors
属性的值末尾追加如下内容
{ /* enum item */
"name": "Constants and enums",
"scope": [
"variable.other.constant",
"variable.other.enummember"
],
"settings": {
"foreground": "#4FC1FF",
}
},
{ /* 123456789 */
"name": "Number",
"scope": "constant.numeric",
"settings": {
"foreground": "#AC80FF"
}
},
{ /* 0x */
"name": "Units",
"scope": "keyword.other.unit",
"settings": {
"foreground": "#AC80FF"
}
},
{ /* //Comment */
"name": "Comment",
"scope": "comment",
"settings": {
"foreground": "#88846f"
}
},
{ /* 'x' "hello" ... */
"name": "String",
"scope": "string",
"settings": {
"foreground": "#E6DB74"
}
},
{ /* "%s %d %f %c ..." */
"name": "User-defined constant",
"scope": "constant.character, constant.other",
"settings": {
"foreground": "#E6DB74"
}
},
{ /* a,b,c i,j,k ... */
"name": "Variable",
"scope": "variable",
"settings": {
"fontStyle": "",
"foreground": "#F8F8F2"
}
},
{ /* if else for while return ... */
"name": "Keyword",
"scope": "keyword",
"settings": {
"foreground": "#F92672"
}
},
{ /* > < = ! + - */
"scope": "keyword.operator",
"settings": {
"foreground": "#d4d4d4"
}
},
{ /* sizeof */
"scope": [
"keyword.operator.expression",
"keyword.operator.cast",
"keyword.operator.sizeof",
"keyword.operator.alignof",
"keyword.operator.typeid",
"keyword.operator.alignas",
"keyword.operator.instanceof",
"keyword.operator.logical.python",
"keyword.operator.wordlike"
],
"settings": {
"foreground": "#F92672"
}
},
{ /* new */
"scope": [
"keyword.operator.new"
],
"settings": {
"foreground": "#6491c5"
}
},
{ /* void int char short long unsigned */
"name": "Storage",
"scope": "storage",
"settings": {
"foreground": "#ff80c0"
}
},
{ /* this self */
"name": "this.self",
"scope": "variable.language",
"settings": {
"foreground": "#ff91bf"
}
},
{ /* ClassName ... */
"name": "Class name",
"scope": [
"entity.name.type",
"entity.name.class",
"entity.name.namespace",
"entity.name.scope-resolution",
"entity.other.inherited-class"
],
"settings": {
"fontStyle": "",
"foreground": "#6491c5"
}
},
{ /* main test ... */
"name": "Function name",
"scope": "entity.name.function",
"settings": {
"fontStyle": "",
"foreground": "#66D9EF"
}
},
{ /* argc argv ... */
"name": "Function argument",
"scope": "variable.parameter",
"settings": {
"foreground": "#c7c7c7"
}
},
{ /* define name */
"scope": [
"meta.preprocessor",
"entity.name.function.preprocessor"
],
"settings": {
"foreground": "#AC80FF"
}
},
其他设置
文件 > 首选项 > 设置 > 打开设置(json)
"editor.fontSize": 18.5,
"editor.lineHeight": 26,
"editor.formatOnType": true,
"editor.formatOnSave": true,