开发者

HTML Editor in Visual Studio 2008: how to break attributes to separate lines?

开发者 https://www.devze.com 2022-12-21 10:57 出处:网络
In Visual Studio 2008, I\'ve used a nice feature in its XAML editor which breaks a line so that a control\'s attributes are automatically positioned on new lines: one attribute per line.

In Visual Studio 2008, I've used a nice feature in its XAML editor which breaks a line so that a control's attributes are automatically positioned on new lines: one attribute per line.

Is th开发者_运维百科ere a way to do the same for the HTML editor?

Thank you.


Oded, thank you very much! You gave me an idea on how to apply "one attribute per line" formatting to an ASP.NET document:

  1. In Visual Studio 2008, right-click on the .aspx file in the Solution Explorer.
  2. Select "Open With..".
  3. Select "XML Editor". [Assuming that the XML Editor has been properly configured in Tools->Options prior to doing this.]
  4. Edit -> Advanced -> Format Document.

This reformats the document so that each attribute is positioned in its own line, and all of them are nicely indented.

Of course, if I later reopen the same file in Web Forms Designer and format it again, it goes back to what it looked like before. But for my purposes (easily finding the required attributes in a large file), this temporary solution is quite sufficient.

Once again, thank you very much!

Best regards,

Dmitriy

0

精彩评论

暂无评论...
验证码 换一张
取 消