开发者

Prevent Visual Studio 2008 from rewriting inline code?

开发者 https://www.devze.com 2022-12-28 22:24 出处:网络
When writing inline code in an .aspx file and some lines down closing a statement with <% } %>, Visual Studio tries to be开发者_StackOverflow nice but messes it up by rewriting it all. Is there

When writing inline code in an .aspx file and some lines down closing a statement with <% } %>, Visual Studio tries to be开发者_StackOverflow nice but messes it up by rewriting it all. Is there any way of turning this rewriting off, but only for inline code?


alt text http://img338.imageshack.us/img338/8029/autoformatting.png

This setting will however have effect on all C# code, not just inline code.


An alternate approach is to use CTRL-Z to undo the auto format operation. I happen to like this better than disabling the auto format altogether since VS's style works most of the time for me. I use CTRL-Z a lot when I am trying to line things up to make the code easier to read. It might not work for you, but it is an option.

0

精彩评论

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