第一部分:插件
VSCode內置"emmet"插件,"convert to utf-8"等插件效果!十分強大!代碼提示功能特別強悍!
VSCode官網插件地址:點擊此處!
插件總覽:插件越來越多,就不一一詳解了!
插件部分詳解:
1.vscode-icons:文件都能以圖標修飾,十分清晰明了,易於查看!
效果:
2.Open Html in Default Browser:html文件中,右鍵有“在默認瀏覽器中打開”的選項!
--中國人寫的--
3.Paste and Indent:粘貼並縮進(目前版本只有粘貼,沒有粘貼縮進功能!);鏈接
設置:“鍵盤快捷方式”-》keybindings.json:
[ { "key": "ctrl+v", "command": "pasteAndIndent.action", "when": "editorTextFocus && !editorReadonly" }, { "key": "ctrl+v", "command": "editor.action.clipboardPasteAction", "when": "!editorTextFocus" }, { "key": "ctrl+shift+v", "command": "editor.action.clipboardPasteAction", "when": "editorTextFocus && !editorReadonly" } ]
mac系統應該是:"ctrl"相應的改為"cmd"!
4.Path Intellisense:路徑補全功能!
5.JQuery Code Snippets:jQuery代碼片段
輸入jq就可以看到很多片段了,不過感覺有了jQuery代碼提示(參見我的另一篇博客:http://www.cnblogs.com/why-not-try/p/8044766.html),這個顯得雞肋!
第二部分:用戶設置(settings.json)
1 { 2 "editor.fontSize": 19, 3 "editor.fontFamily": "Consolas", 4 //換行 5 "editor.wordWrap": "on", 6 // 配置php可執行文件: 7 "php.validate.executablePath": "D:/Xampp/php/php.exe", 8 "workbench.iconTheme": "vscode-icons", 9 "git.path":"d:/git/Git/mingw64/libexec/git-core/git.exe" , 10 //關閉自動更新擴展 11 "extensions.autoUpdate": false, 12 //右鍵格式化文件 13 "prettier.singleQuote": true, 14 "prettier.semi":false, 15 "vetur.format.defaultFormatter.html": "js-beautify-html", 16 //配置eslint 17 "eslint.autoFixOnSave": true, 18 "files.autoSave":"off", 19 "eslint.validate": [ 20 "javascript", 21 "javascriptreact", 22 "html", 23 { "language": "vue", "autoFix": true } 24 ], 25 "eslint.options": { 26 "plugins": ["html"] 27 }, 28 //為了符合eslint的兩個空格間隔原則 29 "editor.tabSize": 2 30 31 }