没整理前
Ctrl + S 保存一下 自动整理
教程
一:左侧扩展搜索:Vetur
二:点击设置图标,选择扩展设置
三:点击在settings.json中编辑
代码在这
{
"backgroundCover.opacity": 1,
"window.zoomLevel": -1,
"vsicons.dontShowNewVersionMessage": true,
"workbench.sideBar.location": "left",
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"emmet.triggerExpansionOnTab": true,
"editor.fontSize": 18,
"workbench.iconTheme": "vscode-icons",
"editor.multiCursorModifier": "alt",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"editor.renderControlCharacters": false,
"git.autofetch": true,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_line_length": 220,
"wrap_attributes": "auto",
"end_with_newline": false
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"workbench.colorTheme": "Default Dark+",
"editor.largeFileOptimizations": false,
"emmet.excludeLanguages": [
"markdown"
],
"editor.formatOnSave":true
}
第一个参数默认可能没有,用来设置JS格式化但不换行
第二个是一行显示多少属性