欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

在VSCode中,如何避免代码格式化后自动换行的设置

最编程 2024-02-20 10:40:34
...

 

 

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
        }
    },
}

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
        }
    },
}

原文地址:https://www.cnblogs.com/luoguixin/p/16171085.html

推荐阅读