Jos*_*man 6 visual-studio-code vscode-settings
当我格式化HTML文件时,VS Code正在堆叠元素属性。有什么办法可以禁用此功能?
小智 7
这对我有用。在“Settings.json”文件中添加以下行
"prettier.printWidth": 300
Run Code Online (Sandbox Code Playgroud)
默认设置是:
"html.format.wrapAttributes": "auto"
Run Code Online (Sandbox Code Playgroud)
随着"auto"
意思是:
仅在超过行长时换行属性。
线长在其他设置中定义,默认为120
:
// Maximum amount of characters per line (0 = disable).
"html.format.wrapLineLength": 120
Run Code Online (Sandbox Code Playgroud)
因此,将设置"html.format.wrapLineLength"
为0
应该可以为您提供所需的行为。
归档时间: |
|
查看次数: |
2510 次 |
最近记录: |