
vscode用户设置
VS Code 是目前最流行的代码编辑器之一,合理的用户设置能大幅提升编码效率。以下是我的个人配置备份,涵盖编辑器外观、格式化、ESLint、Emmet 等常用选项,可直接复制使用。
1{
2 "update.channel": "none",
3 "extensions.autoUpdate": false,
4 "editor.renderLineHighlight": "none",
5 "editor.renderWhitespace": "none",
6 // "editor.fontFamily": "Consolas",
7 "editor.fontSize": 15,
8 "editor.cursorBlinking": "smooth",
9 "editor.multiCursorModifier": "ctrlCmd",
10 "editor.formatOnPaste": true,
11 "editor.formatOnSave": true,
12 // 是否允许自定义的snippet片段提示,比如自定义的vue片段开启后就可以智能提示
13 "editor.snippetSuggestions": "top",
14 "workbench.iconTheme": "vscode-great-icons",
15 "workbench.startupEditor": "newUntitledFile",
16 "html.suggest.angular1": false,
17 "html.suggest.ionic": false,
18 "files.trimTrailingWhitespace": true,
19 // vetur插件格式化使用beautify内置规则
20 "vetur.format.defaultFormatter.html": "js-beautify-html",
21 "prettier.tabWidth": 4,
22 // VScode 文件搜索区域配置
23 "search.exclude": {
24 "**/dist": true,
25 "**/build": true,
26 "**/elehukouben": true,
27 "**/.git": true,
28 "**/.gitignore": true,
29 "**/.svn": true,
30 "**/.DS_Store": true,
31 "**/.idea": true,
32 "**/.vscode": false,
33 "**/yarn.lock": true,
34 "**/tmp": true
35 },
36 // 排除文件搜索区域,比如node_modules(贴心的默认设置已经屏蔽了)
37 "files.exclude": {
38 "**/.idea": true,
39 "**/yarn.lock": true,
40 "**/tmp": true
41 },
42 // 配置文件关联,以便启用对应的智能提示,比如wxss使用css
43 "files.associations": {
44 "*.vue": "vue",
45 "*.wxss": "css"
46 },
47 // 配置emmet是否启用tab展开缩写
48 "emmet.triggerExpansionOnTab": true,
49 // 配置emmet对文件类型的支持,比如vue后缀文件按照html文件来进行emmet扩写
50 "emmet.syntaxProfiles": {
51 "vue-html": "html",
52 "vue": "html",
53 "javascript": "javascriptreact",
54 // xml类型文件默认都是单引号,开启对非单引号的emmet识别
55 "xml": {
56 "attr_quotes": "single"
57 }
58 }, // 是否开启eslint检测
59 "eslint.enable": false,
60 // 文件保存时,是否自动根据eslint进行格式化
61 "eslint.autoFixOnSave": false,
62 // eslint配置文件
63 "eslint.options": {
64 "plugins": [
65 "html",
66 "javascript",
67 {
68 "language": "vue",
69 "autoFix": true
70 },
71 "vue"
72 ]
73 },
74 // eslint能够识别的文件后缀类型
75 "eslint.validate": [
76 "javascript",
77 "javascriptreact",
78 "html",
79 "vue",
80 "typescript",
81 "typescriptreact"
82 ],
83 // 快捷键方案,使用sublime的一套快捷键
84 "sublimeTextKeymap.promptV3Features": true
85}
- 标题: vscode用户设置
- 作者: Jerome Xiong
- 创建于: 2020-06-15 18:00
- 链接: https://jeromexiong.github.io/2020/06/15/工具/vscode用户设置/
- 版权声明:本文章采用 CC BY-NC-SA 4.0 进行许可。
评论