在vscode官網下載版本安裝。javascript
打開文件->首選項->設置,就會進入到 settings.json 文件中,在左側是VSCode默認的配置,在窗口右側能夠進行一系列的配置。如下是個人自定義配置css
{ "workbench.colorTheme": "Monokai", "workbench.iconTheme": "vscode-icons", //用於在Vue中體驗Emmet "emmet.syntaxProfiles": { "vue-html": "html", "vue": "html" }, //配置Eslint "eslint.validate": [ "javascript", "javascriptreact", "html", "vue" ], //設置字體大小 "editor.fontSize": 18, "editor.tabSize": 2, "files.associations": { "*.vue": "vue" }, //Vetur默認使用 eslint-plugin-vue來檢測 <template>,關閉該檢測 "vetur.validation.template": false, "files.exclude": { "**/.git": true, "**/.svn": true, "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, "**/.vscode": true, "**/.idea": true }, //配置能夠格式化的文件 "beautify.language": { "js": { "type": [ "javascript", "json" ], "filename": [ ".jshintrc", ".jsbeautify" ] }, "css": [ "css", "scss" ], "html": [ "htm", "html", "vue" ] } }
打開文件->首選項->鍵盤快捷方式,點擊keybindings.json修改快捷鍵(使用HookyQR.beautify的前提是安裝了beautify):html
[ { "key": "ctrl+shift+f","command": "HookyQR.beautify","when": "editorTextFocus"}, { "key": "ctrl+shift+/", "command": "editor.action.blockComment"} ]
打開文件->首選項->設置,配置vue
"eslint.validate": [ "javascript", "javascriptreact", "html", "vue" ]
1.在vscode按下Shift + Alt + u快捷鍵,自動打開gist建立頁面,在github頁面上建立gist。java
2.回到vscode,將建立後gist的key輸入vscode的框中,回車。react
3.建立成功可看到如下畫面,記錄下gist ID。webpack
4.再按Shift + Alt + u快捷鍵就是同步數據。git
1.Shift + Alt + D打開輸入框,輸入gist ID。github
2.配置同步成功可看到如下畫面。web
將vscode更新至最新版1.31.1版本後,界面默認顯示英文,默認的用戶設置配置文件找不到。