最近迷上了這個工具,啟動速度快,好多插件。唯一不滿意的地方就是svn版本控制工具。下面發現我裝的一些插件及配置:
我安裝的一些插件:
上面是我裝的插件,等有時間再解釋下插件的作用。
接下來說下配置:
進入設置步驟:
進入設置頁面選擇工作區設置
這是我的一些設置如下:
附上設置類容:
{ "workbench.startupEditor": "newUntitledFile", "workbench.editor.enablePreview": false, //打開文件不覆蓋 "search.followSymlinks": false, //關閉rg.exe進程 "editor.minimap.enabled": true, //關閉快速預覽 "files.autoSave": "off", //打開自動保存 "editor.lineNumbers": "on", //開啟行數提示 "editor.quickSuggestions": { //開啟自動顯示建議 "other": true, "comments": true, "strings": true }, "editor.tabSize": 2, //每次保存自動格式化 "eslint.autoFixOnSave": true, // 每次保存的時候將代碼按eslint格式進行修復 "prettier.eslintIntegration": true, //讓prettier使用eslint的代碼格式進行校驗 "prettier.semi": false, //去掉代碼結尾的分號 "prettier.singleQuote": true, //使用帶引號替代雙引號 "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //讓函數(名)和后面的括號之間加個空格 "eslint.validate": [ //開啟對.vue文件中錯誤的檢查 "javascript", "javascriptreact", { "language": "html", "autoFix": true }, { "language": "vue", "autoFix": true } ], "explorer.confirmDelete": false, "files.associations": { "*.vue": "vue", "*.html": "html" }, "emmet.triggerExpansionOnTab": true, "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe" }
還可以設置用戶代碼模板。設置如下:
我用這個工具主要做vue開發的,下面分享我vue代碼片段
搜vue.json並且打開它。將一下類容粘貼上去保存即可。
{ "Print to console": { "prefix": "vue", "body": [ "<template>", " <div>\n", " </div>", "</template>\n", "<script>", "export default {", " props: {\n", " },", " components: {\n", " },", " watch: {\n", " },", " data() {", " return {\n", " };", " },", " computed: {\n", " },", " created() {\n", " },", " mounted() {\n", " },", " methods: {\n", " },", "};", "</script>\n", "<style scoped lang=\"${1:scss}\">\n", "</style>\n" ], "description": "Create vue template" } }
下面測試一下怎么使用:
新建一個vue文件
輸入vue,按下enter或者tab鍵代碼生成。
效果如下: