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

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.

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.

That was the first thing I thought of too. So I tried it and found that it works for the design view, but does not work for ctrl-k ctrl-d or ctrl-k ctrl-f. – Bradley Mountford May 20 '10 at 20:24 @Bradley: Odd, I only tested it on the source of an ASPX page in a ASP.NET project (not a random HTML page in a csproj or anything), but Ctrl-K, Ctrl-D worked fine.

Are you sure there aren't any syntax or formatting errors in the page (improper nesting, unclosed tags)? That will stop Ctrl-K, Ctrl-D from working. We have one page in particular that refuses to auto-format due to some Javascript in the page.

– Brad Nabholz May 24 '10 at 13:28 That is entirely possible. We have loads of HTML that throws validation warnings in VS (due to server side conditional statements), but renders valid once the server side code runs. – Bradley Mountford May 24 '10 at 14:23.

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.

I don't have resharper on this machine – rsturim May 20 '10 at 19:53 OK, it's just a suggestion that will solve your problem. – brickner May 20 '10 at 19:54 I agree. It may not be the right answer for OP, but I wouldn't say it deserves a downvote as it IS an answer that works.

– Bradley Mountford May 20 '10 at 19:57 +1 since a naked visual studio doesn't give you this choice. – Zonko May 20 '10 at 7:49.

When I got to SSMS and SQL Server 2005, I discovered the delights of SQL Refactor, and so I stopped using SQL Prompt. SQL Refactor did everything I wanted. Red-Gate have, at long last, released a version of SQL Prompt, SQL Prompt 3.8 Pro, that has SQL Refactor’s excellent Beautifier.

It will now lay existing SQL code, as well as the code you are typing in. This is more exciting than you might think, because SQL Prompt will work in Visual Studio and Query Analyser as well as SSMS, so all those poor folks stuck in those corporates that still haven’t moved to SQL Server 2005 will, at last, have a decent SQL Code formatter! Wangz Instant SQL Formatter.

This performs the function of Beautification and prettification.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions