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.
Scott Gu has a posting on how to do it. Sceenshot are there too.
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+DI would get...
<div>
<button>
</button>
</div>
...which is where the formatting begins to surface.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.