VSCode格式化代码后,设置代码不自动换行

1、ctrl +, 打开设置;

2、点击工作区,点击右上角 打开设置(json)

 

 

3、输入选择代码,并保存;

 

 

 

 

 内容代码如下:

{
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_line_length": 240,
            "wrap_attributes": "auto",
            "end_with_newline": false
        },
        "prettyhtml": {
            "printWidth": 100,
            "singleQuote": false,
            "wrapAttributes": false,
            "sortAttributes": false
        }
    },
}
posted @ 2022-01-04 19:17  lear  阅读(2173)  评论(0编辑  收藏  举报