常用的插件
- Chinese (Simplified) Language Pack for Visual Studio Code 中文插件
- Auto Complete Tag
自动添加结束标签 更改 HTML/XML 标签名时,自动更新相对应的开始标签或结束标签的标签名 - Beautify 格式美化
- Bracket Pair Colorizer 它为代码中的各种结对的括号兄弟们提供了颜色高亮等功能
- Color Highlight 高亮显示颜色
- ESLint 实现错误代码标识以及自动修复
- HTML CSS Support 让 html 标签上写class 智能提示当前项目所支持的样式
- One Dark Pro 暗色主题
- Prettier - Code formatter
- Vetur
- Vue 2 Snippets
- Path Intellisense 路径补全
- Guides 指导线,当前所在的级别缩进线会变红,当前在哪一级一目了然。
- Indent-Rainbow 带颜色的缩进
- Todo Tree 待办
setting.json
{
"locale": "zh-CN",
// VScode主题配置
"editor.tabSize": 2,
"editor.lineHeight": 24,
"editor.renderLineHighlight": "none",
"editor.renderWhitespace": "none",
"editor.fontFamily": "Consolas",
"editor.fontSize": 15,
"editor.cursorBlinking": "smooth",
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnSave": false,
"editor.snippetSuggestions": "top",
"editor.wordWrapColumn": 200,
"editor.wordWrap": "off",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": false
},
// 保存时自动格式化
"editor.formatOnPaste": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.shell.windows": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"typescript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.suggest.autoImports": true,
"workbench.startupEditor": "newUntitledFile",
"workbench.colorCustomizations": {
// 设置guide线高亮颜色
"editorIndentGuide.activeBackground": "#ff0000"
},
// #让函数(名)和后面的括号之间加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
// 启用/禁用导航路径
"breadcrumbs.enabled": true,
// VScode 文件搜索区域配置
"search.exclude": {
"**/dist": true,
"**/build": true,
"**/elehukouben": true,
"**/.git": true,
"**/.gitignore": true,
"**/.svn": true,
"**/.DS_Store": true,
"**/.idea": true,
"**/.vscode": false,
"**/yarn.lock": true,
"**/tmp": true
},
// 配置emmet是否启用tab展开缩写
"emmet.triggerExpansionOnTab": true,
// 配置emmet对文件类型的支持
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html",
"javascript": "javascriptreact",
"xml": {
"attr_quotes": "single"
}
},
// 在react的jsx中添加对emmet的支持
"emmet.includeLanguages": {
"jsx-sublime-babel-tags": "javascriptreact",
"wxml": "html"
},
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"wrap_attributes": "force-aligned"
},
// 是否开启eslint检测
"eslint.enable": false,
// 文件保存时,是否自动根据eslint进行格式化
"eslint.autoFixOnSave": false,
// eslint配置文件
"eslint.options": {
"configFile": "E:/aaaworkspace/ex/experience/.eslintrc.js",
"plugins": [
"html",
"vue"
]
},
// 格式化快捷键 shirt+alt+F
// 如果为true,将使用单引号而不是双引号
"prettier.singleQuote": true,
// 代码换行,每一行最大占有字符数
"prettier.printWidth": 200,
// 设置apicloud在vscode中的wifi真机同步根目录,默认可不设置
"apicloud.subdirectories": "/apicloudproject",
"window.zoomLevel": -1,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.associations": {
},
}