【发布时间】:2020-09-02 15:10:12
【问题描述】:
我有以下 html 代码:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css"
integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
每当我通过按shift+Alt+f", it just wraps the integrityattribute to the next line. I would like to keep everything on one line. I did some research, and found out the setting that control it ishtml.format.wrapAttributes`来使用VS代码的自动格式化程序时,但根据文档,只有四个设置是:
auto: Wrap when the line length is exceeded
force: Wrap all attributes, except first
force-aligned: Wrap all attributes, except first, and align attributes
force-expand-multiline: Wrap all attributes
没有关闭它的设置。我尝试将其设置为"html.format.wrapAttributes": false 和"html.format.wrapAttributes": ""。他们没有帮助。
我想知道如何设置 VS 代码,以便每次我使用 VS 代码 HTML 自动格式化程序时,它不再将 integrity 属性包装到另一行?
【问题讨论】:
-
"html.format.wrapAttributes": "aligned-multiple" 有效吗?
标签: html visual-studio-code vscode-settings