vscode是編輯器setting.json配置
{
"workbench.sideBar.location": "left",
"editor.fontSize": 18,
"editor.tabSize": 2,
"editor.formatOnSave": true, //每次保存自動格式化(在vue項目中可能需要關閉掉)
"editor.formatOnType": true,
"editor.snippetSuggestions": "top",
// Controls whether format on paste is on or off
"editor.formatOnPaste": true,
"window.zoomLevel": 1,
"atomKeymap.promptV3Features": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"editor.multiCursorModifier": "ctrlCmd",
"files.autoSave": "off",
"editor.detectIndentation": false, //縮進
"vetur.validation.template": false, //遍歷時報錯
"explorer.confirmDragAndDrop": false, // 2019-1-7添加
"editor.wordWrap": "on", //換行
"terminal.integrated.shell.windows": "D:\\git\\Git\\bin\\bash.exe", //配置git終端
"team.showWelcomeMessage": false, //scss報錯
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
},
"html.format.wrapAttributes": "force-aligned",
// 文件頂部註釋
"fileheader.customMade": {
"Author": "renlei",
"Date": "Do not edit", // 文件創建時間(不變)
"LastEditors": "renlei", // 文件最後編輯者
"LastEditTime": "Do not edit", // 文件最後編輯時間
"Description": "" //描述
},
// 函數註釋
"fileheader.cursorMode": {
"name": "handle",
"description": "",
"param": ":{ type }",
"return": ""
},
"eslint.options": {
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
}
}
},
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"aspx": "html"
},
"emmet.triggerExpansionOnTab": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"jsx"
],
"prettier.singleQuote": false,
"prettier.semi": true,
// "vetur.format.defaultFormatterOptions": {
// "wrap_attributes": "force-aligned"
// },
//這是大括號後不換行
"beautify.config": {
"brace_style": "collapse,preserve-inline"
},
// Set backgroundColor
"highlight-icemode.backgroundColor": "red",
// Set Border Color
"highlight-icemode.borderColor": "blue",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned" // 可以換成上面任意一種value
}
},
//html行內樣式提示
"editor.parameterHints": true,
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "michelemelluso.code-beautifier"
},
"[css]": {
"editor.defaultFormatter": "michelemelluso.code-beautifier"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"vsicons.dontShowNewVersionMessage": true,
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.suggest.snippetsPreventQuickSuggestions": false,
"update.mode": "none",
"typescript.disableAutomaticTypeAcquisition": true,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.colorTheme": "Dracula",
"javascript.updateImportsOnFileMove.enabled": "always"
}