以monokai为蓝本,复制一份自己的主题:
源文件:
D:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai
新文件:
D:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai_mine
主题文件的目录结构是这样的,3个文件都得改:
就把Monokai改成Monokai_Mine就行了。
以前的:
{
"displayName": "Monokai Theme",
"description": "Monokai theme for Visual Studio Code"
}
新的:
{
"displayName": "Monokai_Mine Theme",
"description": "Monokai_Mine theme for Visual Studio Code"
}
"name": "theme-Monokai", ---> "name": "theme-Monokai_Mine",
"label": "Monokai", ---> "label": "Monokai_Mine",
"path": "./themes/monokai-color-theme.json" ---> "path": "./themes/monokai_mine-color-theme.json"
以前的:
{
"name": "theme-Monokai",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},
"contributes": {
"themes": [
{
"label": "Monokai",
"uiTheme": "vs-dark",
"path": "./themes/monokai-color-theme.json"
}
]
}
}
新的:
{
"name": "theme-Monokai_Mine",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.0.0",
"publisher": "vscode",
"license": "MIT",
"engines": {
"vscode": "*"
},
"contributes": {
"themes": [
{
"label": "Monokai_Mine",
"uiTheme": "vs-dark",
"path": "./themes/monokai_mine-color-theme.json"
}
]
}
}
然后选中自己的主题,Monokai_Mine:
接下来修改monokai_mine-color-theme.json里面的各项颜色值就行了,每次改完重启VSCode查看效果。