开发者

How do I stop Visual Studio 2008 from wrapping lines when formatting code

I have an annoying problem with Visual Studio 2008.

When I run the "format code" command ("control+k, control+d") -- it will insert a carriage return. How do I get it to stop doing this???

For example:

<label for="shipCompanyName">Company Name:</label>

undesirably becomes

<label for="shipCompanyName">

Company Name:&l开发者_运维问答t;label />


Go to Tools, Options. Open Text Editor, HTML, and Format. Uncheck "Wrap tags when exceeding specified length".

Oddly, VS2008 doesn't have the same option for XML.


I use ReSharper.

You can configure whether to wrap or not in ReSharper.

ReSharper -> Options -> C# -> Formatting Style -> Line Breaks and Wrapping -> Wrap long lines

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜