VScode格式化HTML代码保持标签属性不换行

文件-首选项-设置

{
    "workbench.colorTheme": "Default Dark+",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "java.requirements.JDK11Warning": false,
    "java.configuration.checkProjectSettingsExclusions": false,
    "java.project.importHint": false,
    "extensions.autoUpdate": false,
    "vetur.completion.scaffoldSnippetSources": {
        

        "workspace": "💼",
        "user": "🗒️",
        "vetur": "✌"
    },
    "vetur.format.defaultFormatter.html": "js-beautify-html",
 "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_line_length": 220,
            "wrap_attributes": "auto",
            "end_with_newline": false
        }
    }
}

格式化快捷键:alt+shift+f

posted @ 2021-12-30 15:26  初夏那片海  阅读(553)  评论(0)    收藏  举报