如何在Visual Studio 2008 2010中更改自动格式化HTML [英] How Change Auto Formatting HTML In Visual Studio 2008 2010
问题描述
< div>
我得到
< div> |< / div>
我要
< div>
|
< / div>
想法?
* UPDATE - I也安装了ReSharper。工具 - >选项 - >文本编辑器 - > HTML - >格式 - >标签特定的选项... - >客户端HTML标签 - > div
注意行分节:以及底部的预览。
请记住,这与HTML文件本身的格式选项有关;而不是VS如何自动完成和智能感知操作。因此,如果没有ReSharper,我可以去启动一个开放的div并关闭它,并得到你在HTML文档中描述的内容...
pre $ < DIV>< / DIV>
如果我将其更改为...
< div><按钮>< / button>< / div>
...然后按CTRL + K,CTRL + DI会得到...
< div>
<按钮>
< / button>
< / div>
...这是格式化开始出现的位置。
The auto formatter doesnt seem to be as configurable for HTML as it is for C#.
When I type <div>
I get
<div>|</div>
I want
<div>
|
</div>
Thoughts?
*UPDATE - I have ReSharper installed as well.
Tool -> Options -> Text Editor -> HTML -> Format -> Tag Specific Options... -> Client HTML Tags -> div
Note the Line breaks: section; as well as a preview at the bottom.
Keep in mind this has to do with the formatting option of the HTML file itself; NOT how auto complete and IntelliSense operate within VS. Therefore without ReSharper I can go start an open div and close it and will get what you describe within the HTML document...
<div></div>
If I were to change that to...
<div><button></button></div>
...and hit CTRL+K, CTRL+D I would get...
<div>
<button>
</button>
</div>
...which is where the formatting begins to surface.
这篇关于如何在Visual Studio 2008 2010中更改自动格式化HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!