VSCODE相关设置

HTML代码自动补全

{
  "window.zoomLevel": 1,
  "git.ignoreMissingGitWarning": true, // 忽略“缺失git”的警告
  "files.autoSave": "onFocusChange", // 配色
  "editor.tabSize": 2, // 缩进,tab格数
  "editor.fontSize": 14, // 字号
  "files.associations": {
    "*.vue": "html"
  },

 

Setting.JSON设置:

{
  "window.zoomLevel": 1,
  "git.ignoreMissingGitWarning": true, // 忽略“缺失git”的警告
  "files.autoSave": "onFocusChange", // 配色
  "editor.tabSize": 2, // 缩进,tab格数
  "editor.fontSize": 14, // 字号
  "files.associations": {
    "*.vue": "html"
  },
  // 文本头
  "fileheader.Author": "@Guojufeng",
  "fileheader.LastModifiedBy": "@Guojufeng",
  // 快捷浏览html页面
  "view-in-browser.customBrowser": "chrome",
  "open-in-browser.default": "chrome",
  "explorer.confirmDragAndDrop": false,
  "minapp-vscode.disableAutoConfig": true,
  // 显示编辑时的控制字符(markdown中删除不干净出现的“s”)
  "editor.renderControlCharacters": true,
  "explorer.confirmDelete": false,
  "git.confirmSync": false,
  "git.autofetch": true,
  "git.enableSmartCommit": true,
  "python.jediEnabled": false,
  "breadcrumbs.enabled": true,
  // 每次保存的时候自动格式化
  // "editor.formatOnType": true,
  "editor.formatOnSave": true,
  // 在保存时运行的代码操作类型。
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  // 自动美化
  "beautify.language": {
    "js": {
      "type": [
        "javascript",
        "json"
      ],
      "filename": [
        ".eslintrc",
        ".jsbeautify"
      ]
    },
    "css": [
      "css",
      "scss"
    ],
    "html": [
      "htm",
      "html",
      "vue"
    ]
  },
  // 去掉代码结尾的分号
  "prettier.semi": false,
  // 单引号,而不是双引号
  "prettier.jsxSingleQuote": true,
  "prettier.singleQuote": true,
  // prettier使用eslint格式校验
  "prettier.eslintIntegration": true,
  // #让函数(名)和后面的括号之间加个空格
  "typescript.format.insertSpaceBeforeFunctionParenthesis": true,
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  // 每次保存的时候将代码按eslint格式进行修复
  "eslint.autoFixOnSave": true,
  // eslint添加 vue 支持
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "html",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  // jsx中使用emmet自动补全代码
  "emmet.triggerExpansionOnTab": true,
  // 扩展emmet的支持
  "emmet.includeLanguages": {
    "wxml": "html",
    "javascript": "javascriptreact"
  },
  // 让vue中的js按编辑器自带的ts格式进行格式化
  // "vetur.format.defaultFormatter.js": "prettier",
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned"
    },
    // vue文件转换单引号、去掉分号
    "prettier": {
      "semi": false,
      "singleQuote": true
    }
  },
  "vetur.validation.template": false,
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "editor.quickSuggestions": null
}

  

posted @ 2021-01-01 14:26  淮生  阅读(90)  评论(0编辑  收藏  举报