vscode配置--用户配置
// 将设置放入此文件中以覆盖默认设置 { "files.associations": { "*.vue": "vue", "*.wpy": "vue", "*.wxml": "html", "*.wxss": "css" }, "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "git.enableSmartCommit": true, "git.autofetch": true, "emmet.triggerExpansionOnTab": true, "emmet.showAbbreviationSuggestions": true, "emmet.showExpandedAbbreviation": "always", "emmet.includeLanguages": { "vue-html": "html", "vue": "html", "wpy": "html" }, "workbench.colorTheme": "Monokai", "git.confirmSync": false, "explorer.confirmDelete": false, "editor.fontSize": 16, "window.zoomLevel": 1, "editor.wordWrap": "on", "cssrem.rootFontSize": 75, "prettier.singleQuote": true, "editor.detectIndentation": false, "prettier.tabWidth": 4, "prettier.eslintIntegration": true, "prettier.trailingComma": "none" }
2020年版配置如下:
// 将设置放入此文件中以覆盖默认设置 { "files.associations": { "*.vue": "vue", "*.wpy": "vue", "*.wxml": "html", "*.wxss": "css" }, "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "git.enableSmartCommit": true, "git.autofetch": true, "emmet.triggerExpansionOnTab": true, "emmet.showAbbreviationSuggestions": true, "emmet.showExpandedAbbreviation": "always", "emmet.includeLanguages": { "vue-html": "html", "vue": "html", "wpy": "html" }, "workbench.colorTheme": "Monokai", "git.confirmSync": false, "explorer.confirmDelete": false, "editor.fontSize": 12, "window.zoomLevel": 1, "editor.wordWrap": "on", "cssrem.rootFontSize": 75, "prettier.singleQuote": true, // vscode默认启用了根据文件类型自动设置tabsize的选项 "editor.detectIndentation": false, // 重新设定tabsize "editor.tabSize": 4, // #值设置为true时,每次保存的时候自动格式化;值设置为false时,代码格式化请按shift+alt+F "editor.formatOnSave": false, // #每次保存的时候将代码按eslint格式进行修复 // "eslint.autoFixOnSave": true, // // 添加 vue 支持 // "eslint.validate": [ // "javascript", // "javascriptreact", // { // "language": "vue", // "autoFix": true // } // ], "prettier.tabWidth": 4, // "prettier.eslintIntegration": true, "prettier.trailingComma": "none", "editor.rulers": [ 120 ], //每120行就显示一条线 // "prettier.tslintIntegration": true, // 使用tslint "search.exclude": { "**/node_modules": true, "**/bower_components": true, "**/target": true, "**/logs": true, }, // 在使用搜索功能时,将这些文件夹/文件排除在外 "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "**/*.js": { "when": "$(basename).ts" // ts编译后生成的js文件将不会显示在工作空间中 }, "**/node_modules": true }, // 这些文件将不会显示在工作空间中 "python.pythonPath": "E:\\soft\\after\\python", "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, // #让vue中的js按"prettier"格式进行格式化 "vetur.format.defaultFormatter.html": "js-beautify-html", "vetur.format.defaultFormatter.js": "prettier", "vetur.format.defaultFormatterOptions": { "js-beautify-html": { // #vue组件中html代码格式化样式 "wrap_attributes": "force-aligned", //也可以设置为“auto”,效果会不一样 "wrap_line_length": 200, "end_with_newline": false, "semi": false, "singleQuote": true }, "prettier": { "semi": false, "singleQuote": true } }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, }