How Change Auto Formatting HTML In Visual Studio 2008 2010

后端 未结 2 950
暖寄归人
暖寄归人 2021-01-16 11:55

The auto formatter doesnt seem to be as configurable for HTML as it is for C#.

When I type

I get

|
2条回答
  •  梦毁少年i
    2021-01-16 12:39

    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...

    If I were to change that to...

    ...and hit CTRL+K, CTRL+D I would get...

    ...which is where the formatting begins to surface.

提交回复
热议问题