vscode个人配置
vscode插件
首选项设置
{
"workbench.colorTheme": "One Dark Pro",
"workbench.iconTheme": "vscode-icons",
"editor.tabSize": 2,
"files.associations": {
"*.vue": "vue"
},
"eslint.autoFixOnSave": true,
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
}
],
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true
},
"emmet.syntaxProfiles": {
"javascript": "jsx",
"vue": "html",
"vue-html": "html"
},
"extensions.autoUpdate": true,
"editor.cursorBlinking": "smooth",
"workbench.startupEditor": "welcomePage",
"files.autoSave": "off",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"editor.wordWrap": "on",
"vetur.validation.template": false,
"search.followSymlinks": false,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-aligned"
}
}
}
个人代码段
vue.json
{
"Create vue template": {
"prefix": "vtpl",
"body": [
"<template>",
" <div></div>",
"</template>",
"",
"<script type=\"text/ecmascript-6\">",
"export default {",
" data () {",
" return {",
" }",
" }",
"}",
"</script>",
"",
"<style lang=\"${1:css}\" scoped>",
"</style>",
""
],
"description": "Create vue template"
}
}