打造完美編輯器--VS code

主題設(shè)置

  • 顏色主題 One Dark Pro
  • 圖標(biāo)主題 vscode-icons

格式化

  • Prettier

代碼檢查

  • ESLint: 檢查 js 語(yǔ)法規(guī)范
  • TSLint: TypeScript 檢測(cè)
  • Stylelint 檢查 CSS/SCSS/Less 語(yǔ)法規(guī)范
  • Markdownlint 檢查 markdown 語(yǔ)法規(guī)范

自動(dòng)補(bǔ)全

  • Auto Close Tag: 自動(dòng)閉合 html 等標(biāo)簽 (</...>)
  • Auto Rename Tag: 修改 html 標(biāo)簽時(shí),自動(dòng)修改閉合標(biāo)簽)
  • Path Intellisense: 自動(dòng)提示補(bǔ)全路徑
  • Path Autocomplete: 自動(dòng)補(bǔ)全路徑

功能擴(kuò)展

  • Chinese (Simplified) Language Pack for Visual Studio Code: 設(shè)置中文
  • Live Server: 一鍵在本地啟動(dòng)服務(wù)器
  • Vetur: Vue 語(yǔ)法格式支持:
  • Sass: Sass 支持:
  • Settings Sync: 同步編輯器配置
  • koro1FileHeader: 注釋模板
  • Reactjs code snippets: React代碼提示
  • React Redux ES6 Snippets: react-redux代碼提示
  • EditorConfig for VS Code: 統(tǒng)一不同編輯器的代碼風(fēng)格
  • koroFileHeader: 在 vscode 中用于生成文件頭部注釋和函數(shù)注釋的插件
  • language-stylus: stylus 語(yǔ)言支持,支持.styl格式文件
  • Markdown PDF: Markdown生成 PDF 文件
  • settings Sync: 云同步 VS code 編輯器配置
  • LeetCode: 使用LeetCode和中國(guó)力扣題庫(kù)
  • Go: 支持 GoLang

小程序插件

  • minapp: 微信小程序標(biāo)簽、屬性的智能補(bǔ)全
  • Dot Template: 自動(dòng)寫(xiě)入項(xiàng)目模板中的文件

Flutter

  • Dart: Dart語(yǔ)言支持
  • Flutter: Flutter框架

自定義配置(User Settings)

{
  "editor.fontFamily": "Menlo, Consolas, 'Courier New', monospace",
  "editor.fontLigatures": true,
  "editor.fontSize": 24,
  "editor.fontWeight": "500",
  "editor.lineHeight": 24,
  "editor.lineNumbers": "on",
  "editor.minimap.enabled": false,
  "editor.renderIndentGuides": false,
  "editor.rulers": [120],
  "editor.formatOnPaste": true,
  "workbench.colorTheme": "One Dark Pro",
  "explorer.confirmDelete": false,
  "terminal.integrated.fontFamily": "monospace",
  "editor.formatOnType": false,
  "editor.formatOnSave": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "html",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    },
    {
      "language": "typescript",
      "autoFix": true
    },
    "typescriptreact"
  ],
  "eslint.options": {
    "plugins": ["html"]
  },
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "name": "Comments",
        "scope": "comment, punctuation.definition.comment",
        "settings": {
          "fontStyle": ""
        }
      },
      {
        "name": "js/ts italic",
        "scope": "entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super",
        "settings": {
          "fontStyle": ""
        }
      },
      {
        "name": "js ts this",
        "scope": "var.this,variable.language.this.js,variable.language.this.ts,variable.language.this.jsx,variable.language.this.tsx",
        "settings": {
          "fontStyle": ""
        }
      }
    ]
  },
  "files.autoSave": "off",
  "window.zoomLevel": 0,
  "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
  "search.location": "panel",
  // prettier插件 自動(dòng)化格式代碼設(shè)置
  "prettier.eslintIntegration": true,
  "prettier.singleQuote": true, // 強(qiáng)制單引號(hào)
  "prettier.trailingComma": "none", // 尾隨逗號(hào)
  "prettier.semi": false, // 結(jié)尾不加分號(hào)
  "prettier.tabWidth": 2, // 2格縮進(jìn)
  "prettier.arrowParens": "always", // 圍繞箭頭函數(shù)參數(shù)強(qiáng)制使用括號(hào)
  "editor.detectIndentation": false,
  "editor.tabCompletion": "on",
  "liveServer.settings.donotShowInfoMsg": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
  // vetur格式化插件的配置
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatter.ts": "vscode-typescript",
  "vetur.format.options.tabSize": 2,
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned"
    },
    "prettyhtml": {
      "printWidth": 100,
      "singleQuote": true,
      "wrapAttributes": false,
      "sortAttributes": false
    }
  },
  "vetur.validation.template": false,
  "files.associations": {
    "*.json": "jsonc",
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript"
  },
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "minapp-vscode.disableAutoConfig": true,
  "sync.gist": "e9ec7974d53f0325e050467baabafc3a",

  // koroFileHeader插件配置修改
  // "fileheader.configObj": {
  //     "createFileTime": true,
  //     "timeNoDetail": true
  // },
  // 頭部注釋
  "fileheader.customMade": {
    "Description": "file content",
    "Author": "tgb",
    "Date": "Do not edit",
    "LastEditors": "tgb",
    "LastEditTime": "Do not edit"
  },
  "javascript.updateImportsOnFileMove.enabled": "never",
  "editor.tabSize": 2,
  "explorer.confirmDragAndDrop": false,
  "javascript.implicitProjectConfig.experimentalDecorators": true,
  "workbench.iconTheme": "vscode-icons"
}
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容