VS Code 基础配置--是时候清理一下你的配置文件了

984 阅读1分钟
{

  // 代码透视栏字体

  "editor.codeLensFontFamily": "Menlo for Powerline",

  // 光标闪烁

  "editor.cursorBlinking": "phase",

  // 光标平滑插入符号动画

  "editor.cursorSmoothCaretAnimation": true,

  // 检测缩进

  "editor.detectIndentation": true,

  // 字体

  "editor.fontFamily": "Fira Code, Operator Mono, Consolas, 'Courier New', monospace",

  // 字体连字

  "editor.fontLigatures": true,

  // 字体大写

  "editor.fontSize": 14,

  "editor.guides.bracketPairs": "active",

  // 粘贴时格式化

  "editor.formatOnPaste": true,

  // 保存时格式化

  "editor.formatOnSave": true,

  "editor.formatOnType": true,

  // 迷你图 最大列宽

  "editor.minimap.maxColumn": 80,

  // 迷你图 渲染字符

  "editor.minimap.renderCharacters": false,

  // 迷你图 显示滑块

  "editor.minimap.showSlider": "always",

  // 建议选择 最近使用

  "editor.suggestSelection": "recentlyUsed",

  // 建议位置

  "editor.snippetSuggestions": "top",

  // 快速建议

  "editor.quickSuggestions": {

    // 评论

    "comments": true,

    // 其他信息

    "other": true,

    "strings": true

  },

  // 渲染控制字符(隐藏字符)

  "editor.renderControlCharacters": true,

  // 渲染空格

  "editor.renderWhitespace": "all",

  // 平滑滚动

  "editor.smoothScrolling": true,

  "editor.tabSize": 2,

  // 单词换行

  "editor.wordWrap": "on",

  // 句子最大列宽

  "editor.wordWrapColumn": 180,

  // 保存行为

  "editor.codeActionsOnSave": {

    "source.fixAll": false,

    "source.fixAll.eslint": true,

    "source.fixAll.stylelint": true,

    "source.organizeImports": false

  },

  // 确认删除

  "explorer.confirmDelete": false,

  // 确认拖动

  "explorer.confirmDragAndDrop": false,

  "window.autoDetectColorScheme": true,

  "window.dialogStyle": "custom",

  "window.titleBarStyle": "custom",

  // 工作台 活动栏 隐藏

  "workbench.activityBar.visible": true,

  // 当文件删除时关闭编辑文件

  "workbench.editor.closeOnFileDelete": true,

  // 突出显示修改的选项卡

  "workbench.editor.highlightModifiedTabs": true,

  "workbench.editor.tabCloseButton": "left",

  // 列表 平滑滚动

  "workbench.list.smoothScrolling": true,

  // 侧边栏位置

  "workbench.sideBar.location": "left",

  "workbench.startupEditor": "newUntitledFile",

  "workbench.tree.expandMode": "singleClick",

  "workbench.tree.indent": 10,

  // 自动更新 仅允许的插件

  "extensions.autoUpdate": "onlyEnabledExtensions",

  // 忽略建议

  "extensions.ignoreRecommendations": true,

  "files.eol": "\n",

  // 插入最终换行符

  "files.insertFinalNewline": true,

  // 简单对话框

  "files.simpleDialog.enable": true,

  // 修剪尾随空白

  "files.trimTrailingWhitespace": true,

  // 自动获取

  "git.autofetch": true,

  // 确认同步

  "git.confirmSync": false,

  "git.enableSmartCommit": true,

  "git.untrackedChanges": "separate",

  "terminal.integrated.fontFamily": "Menlo for Powerline",

  "terminal.integrated.fontSize": 14,

  "terminal.integrated.fontWeight": "300",

  "terminal.integrated.cursorBlinking": true,

  "terminal.integrated.cursorStyle": "line",

  "terminal.integrated.persistentSessionReviveProcess": "never",

  "terminal.integrated.tabs.enabled": true,

  "scm.diffDecorationsGutterWidth": 2,

  "debug.onTaskErrors": "debugAnyway",

  // 忽略修剪空白

  "diffEditor.ignoreTrimWhitespace": false,

  // 颜色主题

  "workbench.colorTheme": "GitHub Dark Default",

  // 图标主题

  "workbench.iconTheme": "vscode-great-icons"

}

使用时请把注释删除,保证配置简洁性。

更多的配置插件推荐我将在我的 Github 仓库进行更新优化,欢迎大家 Star+1

zgsgs/vscode-setting: 本人的vscode配置 (github.com)