Visual Studio 2010在重新格式化时重新缩进HTML文本(Ctrl + K + D)。这意味着,当文本在换行后已经缩进时,VS会尝试重新缩进以适应最佳块。
<p>Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1
Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2
Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3</p>
变为
<p>Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1
Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2
Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3</p>
Visual Studio 2012不会撤消HTML自动格式设置的缩进。这意味着上面的原始文本变为:
<p>Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1 Line1
Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2 Line2
Line2
Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3 Line3
Line3</p>
如何在VS 2012中获取VS 2010的行为?
我没有找到相应的设置。