• 近日我司更新机器, 死皮赖脸之下换了新机器, 趁机再把VSCode设置补充一下.

设置

  • 打开 首选项 -> 设置, 弹出配置文件 settings.json.
{
  "workbench.startupEditor": "newUntitledFile",
  "editor.fontFamily": "Source Code Pro, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontSize": 14,
  "workbench.iconTheme": "vscode-icons",
  "editor.renderWhitespace": "all",
  "files.trimTrailingWhitespace": true,
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.rulers": [120],
  "files.associations": {
    "*.vue": "vue"
  },
  "eslint.autoFixOnSave": true,
  "eslint.options": {
    "extensions": [
      ".js",
      ".vue"
    ]
  },
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue",
    "vue-html"
  ],
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/dist": true
},
  "emmet.syntaxProfiles": {
    "javascript": "jsx",
    "vue": "html",
    "vue-html": "html"
  },
  "extensions.autoUpdate": true,
  "editor.cursorBlinking": "smooth",
  "window.zoomLevel": 1
}

也可以点击此处下载

键盘快捷方式

  • 打开 首选项 -> 键盘快捷方式, 或者 cmd+K cmd+S 弹出配置文件 keybindings.json.
[
  {
    "key": "cmd+k cmd+u",
    "command": "editor.action.transformToUppercase",
    "when": "editorTextFocus"
  },
  {
    "key": "cmd+k cmd+l",
    "command": "editor.action.transformToLowercase",
    "when": "editorTextFocus"
  },
  {
    "key": "ctrl+g",
    "command": "editor.action.nextMatchFindAction",
    "when": "editorFocus"
  },
  {
    "key": "cmd+g",
    "command": "workbench.action.gotoLine"
  }
]

常用插件

background

ESLint

Git Blame

Markdown PDF

Path Intellisense

Sass Lint

sort-imports

stylelint

vscode-icons

WakaTime

indent-rainbow


Ben Li

一些人,一些事.