当我在格式化HTML文件时,VS Code会堆叠元素属性。有没有办法禁用这个功能?
当我在格式化HTML文件时,VS Code会堆叠元素属性。有没有办法禁用这个功能?
默认设置为:
"html.format.wrapAttributes": "auto"
使用"auto"
表示:
当行长度超过时才换行属性。
行长度由不同的设置定义,默认为120
:
// Maximum amount of characters per line (0 = disable).
"html.format.wrapLineLength": 120
因此将 "html.format.wrapLineLength"
设为 0
将会给您想要的行为。
"prettier.printWidth": 300
Ctrl + Shift + P
)用户设置 json
首选项:用户设置(JSON)
settings.json
文件的末尾添加以下内容:"prettier.printWidth": 120,
"prettier.singleAttributePerLine": false,