每次新安装vscode,格式化换行都很别扭,记录一下,按ctrl+, 找到vetur,在setting.json中编辑
{
"[html]": {
"editor.defaultFormatter": "lonefy.vscode-JS-CSS-HTML-formatter"
},
"[javascript]": {
"editor.defaultFormatter": "lonefy.vscode-JS-CSS-HTML-formatter"
},
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_line_length": 200,
"wrap_attributes": "auto",
"end_with_newline": false
}
},
"vetur.format.options.tabSize": 4,
"vetur.grammar.customBlocks": {
"docs": "md",
"i18n": "json"
}
}