[英]HTML Tag Formatting in Visual Studio
Can anyone please tell me how to auto-format (Ctrl + K, Ctrl + D) HTML tags like this: 谁能告诉我如何自动格式化(Ctrl + K,Ctrl + D)HTML标记,例如:
<label id="myLabelId">Hello</label>
to this format: 这种格式:
<label id="myLabelId">
Hello
</label>
in Visual Studio 2012. I think it would be some setting in Tools -> Text Editor -> HTML -> Formatting. 在Visual Studio 2012中。我认为应该在“工具”->“文本编辑器”->“ HTML”->“格式”中进行一些设置。 I am just not sure, what settings to change.
我只是不确定,要更改哪些设置。
Thanks 谢谢
Harit Harit
Ctrl+K then Ctrl+D, will format the current document. 按Ctrl + K,然后按Ctrl + D,将格式化当前文档。
Ctrl+K then Ctrl+F, will format the selected text. 按Ctrl + K,然后按Ctrl + F,将格式化选定的文本。
or custom formatting for the text (HTML) editor, got to: 或文本(HTML)编辑器的自定义格式,必须:
Options -> Text Editor -> HTML -> Formatting -> Tag Specific Options (Button) -> Client HTML Tags -> a -> Set Line breaks dropdown to Before and after 选项->文本编辑器-> HTML->格式设置->标记特定的选项(按钮)->客户端HTML标记-> a->设置换行符下拉菜单为之前和之后
Do this for all the tags you want formatted differently. 对要设置格式不同的所有标签执行此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.