新的插件目录
1, Auto close tag
2, Auto rename tag
3, beautify
4, chinese language pack for visual studio code
5, ESLint
6, GitLens -git supercharged
7, HTML CSS Support
7,HTML Snippets
8, JavaScript(ES6) code snippets
10,Sass
10, language-stylus
11, Manta's Stylus Supremacy
12, open in browser
12,Prettier - Code formatter
13,JS JSX Snippets
13, React Redux ES6 Snippets15, Reactjs code snippets
16, Typescript React code snippets
17, vscode-open-project
18, Vetur
19, vue
20, Vue 2 Snippets
21, vue-helper
22,TSLint
23,live server 本地服务器
HTML Snippets、JavaScript (ES6) code snippets、jsx、React code snippets、TSLint、Document This、Prettier Code formatter;
// vue组件中html代码格式化样式 "vetur.format.defaultFormatterOptions": { "js-beautify-html": { "wrap_attributes": "force-aligned" }, "prettyhtml": { "printWidth": 160, // No line exceeds 160 characters "singleQuote": false // Prefer double quotes over single quotes }, "prettier": { "printWidth": 300, "semi": false, "singleQuote": true } }, vscode添加prettier格式化 "vetur.format.defaultFormatterOptions": { "prettier": { "semi": false, // 格式化不加分号 "singleQuote": true // 格式化以单引号为主 } }, //分号和双引号确实不会再自动添加了,但是不会在方法括号之间插入空格,可以再加入这条配置即可 "javascript.format.insertSpaceBeforeFunctionParenthesis": true, "vetur.format.defaultFormatter.js": "vscode-typescript",
https://www.jianshu.com/p/a3b13dda486a
插件安装完成之后,还要对一些插件进行配置,例如:
vetur默认配置,
配置的过程:
打开 文件 > 首选项 > 用户设置(U) > 点击右上角---打开设置(json)
// 执行文字相关的导航或操作时将用作文字分隔符的字符 去掉 - 功能:双击css样式选中整个连字符 "editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?", //vetur的配置 "emmet.syntaxProfiles": { "javascript": "jsx", "vue-html": "html", "vue": "html" }, // 使用插件格式化 html "vetur.format.defaultFormatter.html": "js-beautify-html", "eslint.validate": [ "javascript", "javascriptreact", "html", "vue", { "language": "vue", "autoFix": true } ], // 打开文件自动检测缩进 "editor.detectIndentation": false, // tab缩进2个字符 "editor.tabSize": 2,
参考自网站:https://segmentfault.com/a/1190000011779959
参考内容:https://www.cnblogs.com/zhaoshujie/p/9834654.html
https://www.cnblogs.com/liuxianan/p/vscode-plugin-overview.html