优雅代码 只需两步;
打开设置 ---------点击设置文本;
5年前端使用的格式化代码块 你只需复制粘贴保存
{
"editor.fontSize": 18,
"glassit.alpha": 255,
"vetur.format.defaultFormatter.html": "js-beautify-html",
"emmet.includeLanguages": {
"wxml": "html"
},
"minapp-vscode.disableAutoConfig": true,
"explorer.confirmDelete": false,
"vetur.format.options.tabSize": 4,
"vetur.format.defaultFormatterOptions":{
"js-beautify-html":{
"wrap_attributes":"auto"
}
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"diffEditor.ignoreTrimWhitespace": false,
"[javascript]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"[scss]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"security.workspace.trust.untrustedFiles": "open",
"git.confirmSync": false,
"workbench.startupEditor": "none",
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
}
// "vetur.format.defaultFormatterOptions": {
// "js-beautify-html": {
// "wrap_attributes": "force-expand-multiline"
// },
// "prettyhtml": {
// "printWidth": 100,
// "singleQuote": false,
// "wrapAttributes": false,
// "sortAttributes": false
// }
// }
}
第二步;点击查看 不设置 自动换行;
养成好习惯:::登录vscode 同步设置代码 随时随地优雅写代码
over 求关注!!!!!!