vscode更新速度之快已经1.50.1了,以下是根据最新1.50.1在之前的配置做了删减
中文语言包 - Chinese (Simplified) Language Pack for Visual Studio Code
英文的菜单变成友好的中文,使得开发者更加了解自己的编辑器
主题 - One Dark pro
vscode上有很多主题,本人使用的是这块
其他:Material Theme
大家也可以根据自己的喜好到[官方插件](Visual Studio Marketplace)
成对括号不同颜色显示 - Bracket Pair Colorizer2
便于我们更好的梳理逻辑以及代码层次,另外vscode也会整理出一份js的大纲,可以帮助开发者更好的看清代码结构,尤其是在阅读别人的代码的时候
git增强 - gitlens
vscode本身会集成git,但是呢,总有一些体验不好的地方,这时候插件就可以派上用处了
代码中可以显示commit,体验更好的diff;另外,Git History也是值得推荐的,更加注重对比,但是本人觉得够用就好,如果说vscode本身git就已经满足了需求就没必要装很多雷同的插件了;还有git easy也是比较热的插件,大家可以去搜一下
快捷键 - Sublime Importer for VS Code
无缝切换自己熟悉的快捷键;也有其他的选择;或者自己去设置(比较费时)
文件管理 - Project Manager
可以将自己平时经常用的项目快捷管理
注释 - koroFileHeader
文件头注释和函数注释;另外: Document This也值得推荐
代码格式化与美化
eslint: 代码检查
Vetur:格式化vue
Prettier :格式化js/ts/css
不多说,后面会给出具体配置,不必烦恼
Visual Studio IntelliCode
官方的一个插件 : 感知上下文
这个本人在写代码的时候并没有太多感受,具体应该是ai通过你写代码只能提示,这个有待观察其作用大小是否值得
新版的vscode支持了账号的同步所以Settings Sync 就不需要了(你这个渣男)
配置拿走
{
"workbench.sideBar.location": "right",
"workbench.colorTheme": "One Dark Pro",
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.lineHeight": 24,
"editor.fontSize": 18,
"editor.renderWhitespace": "all",
"editor.formatOnSave": true,
"editor.snippetSuggestions": "top",
"editor.wordWrap": "on",
"files.eol": "n",
"merge-conflict.autoNavigateNextConflict.enabled": true,
"typescript.updateImportsOnFileMove.enabled": "always",
"vetur.format.defaultFormatter.html": "prettyhtml",
"vetur.format.defaultFormatter.js": "prettier-eslint",
"vetur.format.defaultFormatter.ts": "vscode-typescript",
"vetur.format.options.tabSize": 2,
"vetur.format.defaultFormatterOptions": {
"prettyhtml": {
"printWidth": 100
}
},
"eslint.lintTask.enable": true,
"eslint.format.enable": true,
"eslint.alwaysShowStatus": true,
"eslint.validate": ["javascript", "javascriptreact", "vue", "typescript"],
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll": true
// "source.fixAll.eslint": true
// "source.fixAll.tslint": false,
},
"terminal.integrated.shell.windows": "C:Program FilesGitbinbash.exe",
"git.enableSmartCommit": true,
"git.showPushSuccessNotification": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"task.slowProviderWarning": ["typescript"],
"prettier.trailingComma": "none",
"prettier.printWidth": 100,
"prettier.vueIndentScriptAndStyle": true,
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"emmet.triggerExpansionOnTab": true,
"editor.renameOnType": true,
"html.format.indentHandlebars": true,
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.associations": {
"*.ejs": "html"
},
"search.followSymlinks": false
}