我的 Visual Studio Code 配置

Alan

Alan

Maintainer of blog

下面展示一下我的VSC配置:

最新配置:

.vscode/settings.json
{
"extensions.autoUpdate": false, // 禁用扩展自动更新
"extensions.autoCheckUpdates": false, // 禁用扩展自动更新
"update.mode": "manual", // VSC更新模式改为手动检测
"editor.lineNumbers": "relative", // 使用相对行号(方便Vim跳转)
// Markdown文件配置
"[markdown]": {
"editor.wordWrap": "on",
"editor.quickSuggestions": true // markdown文件智能提示默认开启(用于支持Snippets)
},
"window.closeWhenEmpty": true, // 如果打开文件为空,关闭VSC编辑器
"files.eol": "\n", // 文件换行符
"files.encoding": "utf8", // 文件编码
"editor.minimap.enabled": false, // 是否显示小地图
"explorer.confirmDelete": false, // 删除文件确认
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"emmet.triggerExpansionOnTab": true,
"todohighlight.maxFilesForSearch": 5120,
"explorer.autoReveal": "focusNoScroll"
}

过时配置:

{
"vim.useCtrlKeys": false,
"editor.largeFileOptimizations": true,
"breadcrumbs.enabled": true,
"editor.renderControlCharacters": true,
"editor.lineNumbers": "relative",
"window.closeWhenEmpty": true,
"window.restoreWindows": "all",
"editor.renderWhitespace": "all",
"editor.renderIndentGuides": true,
"files.eol": "\n",
"files.encoding": "utf8",
"vim.normalModeKeyBindings": [
{
"before": [ "z", "a" ],
"after": [ "<Esc>", "0", "f", "(", "l", "y", "t", ";", "0", "f", "(", "a", "`", "`", "<Esc>", "h", "p", "x", "a", ",", "<Esc>" ]
}
],
"editor.minimap.enabled": false,
"explorer.confirmDelete": false,
"explorer.openEditors.visible": 0,
"editor.cursorBlinking": "phase",
"editor.smoothScrolling": true,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"entity.name.function",
"support.function"
],
"settings": {
"fontStyle": "italic bold"
}
}
]
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"terminal.integrated.rendererType": "dom",
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
"window.zoomLevel": 0,
"html.format.wrapLineLength": 0,
"editor.fontLigatures": true,
"editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace",
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
".vscode": true,
".gitlab": true
},
"extensions.autoUpdate": false,
"emmet.triggerExpansionOnTab": true,
"editor.minimap.showSlider": "mouseover",
"editor.minimap.enabled": false,
"editor.acceptSuggestionOnCommitCharacter": false,
"emmet.triggerExpansionOnTab": true,
"todohighlight.isEnable": true,
"todohighlight.keywords": [
{
"text": "NOTE:",
"isWholeLine": true,
"color": "#0094ff",
"backgroundColor": "rgba(100, 100, 100, 0.8)",
},
{
"text": "TODO",
"color": "red",
"backgroundColor": "rgba(0,0,0,.2)",
"isWholeLine": true
}
],
"todohighlight.maxFilesForSearch": 5120
}