为VS代码中的html标记指定自定义格式

为VS代码中的html标记指定自定义格式,html,formatting,visual-studio-code,Html,Formatting,Visual Studio Code,我喜欢以特定的方式格式化html。例如,使用Telerik的网格(可以有许多属性),我喜欢这样: 在用户设置首选项用户设置设置中 "html.format.wrapAttributes": "force-aligned" 将使所有HTML标记的行为与您的示例类似。您还可以设置 "editor.formatOnSave": true, "editor.formatOnPaste": true 使其在保存和粘贴时自动工作

我喜欢以特定的方式格式化html。例如,使用Telerik的网格(可以有许多属性),我喜欢这样:


在用户设置
首选项
用户设置
设置中

"html.format.wrapAttributes": "force-aligned"
将使所有HTML标记的行为与您的示例类似。您还可以设置

"editor.formatOnSave": true,
"editor.formatOnPaste": true
使其在保存和粘贴时自动工作