vscode格式化代码换行?试试这个配置

在setting.json中把下面的配置项拷上去

"vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
         "wrap_line_length": 900, // 数值越大,一行放的属性越多
         "wrap_attributes": "auto",
         "end_with_newline": false
     },
     "prettyhtml": {
         "printWidth": 100,
         "singleQuote": false,
         "wrapAttributes": false,
         "sortAttributes": false
     }
 },
 "vetur.format.defaultFormatter.html": "js-beautify-html",
 "vetur.format.defaultFormatter.js": "vscode-typescript"
原文地址:https://www.cnblogs.com/zoo-x/p/14601074.html