I am trying to choose for myself, but Visual Studio won't let me. Every time
I switch between Design and HTML views, it reorganizes the code in HTML
view. It also does this when I initially open a file. Just like everyone
else, I have my own ways of organizing code. I won't get into the details of
it here, but one of my most important rules is to never spread an individual
tag over multiple lines. I use this rule because tags that are spread over
multiple lines increases the amount of scrolling necessary. It also makes
the indentation often used for markup languages and other languages that use
tags less efficient because not all lines start with a tag and the amount of
vertical space between an opening and closing tag is increased. And in case
you haven't noticed, when code is printed from Visual Studio the lines
automatically wrap to fit the printer (as they will with most text editors,
some just don't display a "wrap-around" symbol like VS), so spending time
worrying about what my code will look like when printed is pointless,
especially since code is almost always edited on screen.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/ [quoted text, click to view] "Paul Lennon" <pslennon@comcast.net_NOSPAM> wrote in message
news:%23McWSq$YFHA.980@TK2MSFTNGP12.phx.gbl...
> Hi Nathan,
>
> The best way to avoid this problem is to remember that all code will
> eventually be printed one day on a printer with 80 columns. It is best to
> write your code to fit the printer, not your screen. Choose for yourself
> where you want your code to switch lines, don't let the editor do it.
> You'll be happier in the long run.
>
> Paul
>
> Nathan Sokalski wrote:
>> I am writing code for ASP.NET, and when switching between design and HTML
>> view in .aspx files many of the lines that are longer than the screen
>> width automatically wrap to the next line. I do not like to have tags
>> broken in the middle (I want everything between the < and > on the same
>> line). Is there any way to prevent Visual Studio from breaking the tags
>> in the middle? Thanks.