如何防止 VS Code 包装 HTML 标签内容
How to prevent VS Code from wrapping HTML tag content
"html.format.wrapAttributes": "force-aligned"
工作完美,它触及标签属性并且对标签内容没有做任何事情(我正在写 Angular 所以它对我来说是完美的)直到今天。内容开始包裹在我不想包裹的地方,我只希望它保持原样。到处。 "html.format.wrapLineLength": 0
没有帮助,所以 html.format.contentUnformatted
没有帮助(当我开始在那里添加一些标签时 - 一切都中断了)。我需要一个解决方案。
我正在使用 "editor.defaultFormatter": "vscode.html-language-features"
三元运算符的格式来自:
<span>
{{
isTrue
? 'Yes'
: 'No'
}}
</span>
至
<span>
{{
isTrue
? 'Yes'
: 'No'
}}
</span>
是的,这就是 HTML 中的真实情况。
"html.format.templating": true,
解决了这个问题。
"html.format.wrapAttributes": "force-aligned"
工作完美,它触及标签属性并且对标签内容没有做任何事情(我正在写 Angular 所以它对我来说是完美的)直到今天。内容开始包裹在我不想包裹的地方,我只希望它保持原样。到处。 "html.format.wrapLineLength": 0
没有帮助,所以 html.format.contentUnformatted
没有帮助(当我开始在那里添加一些标签时 - 一切都中断了)。我需要一个解决方案。
我正在使用 "editor.defaultFormatter": "vscode.html-language-features"
三元运算符的格式来自:
<span>
{{
isTrue
? 'Yes'
: 'No'
}}
</span>
至
<span>
{{
isTrue
? 'Yes'
: 'No'
}}
</span>
是的,这就是 HTML 中的真实情况。
"html.format.templating": true,
解决了这个问题。