|
| Format Document: Leave line spacing alone and change indentation only? |
 |
Thu, 27 Mar 2008 22:59:44 +000 |
Using Visual Studio 2005 Professional Edition.
Whenever I use the format document (ctrl-k ctrl-d) command when editing aspx or
xml pages, it obliterates my careful hand crafted line spacing. I just want to
standardize the indentation not the line spacing. In contrast, when I issue
this command while editing code-behind files (c#) it does what I want, which is
fix the indentation and leave the spacing alone. How can I get this same
behavior in aspx and xml files?
|
| Post Reply
|
| Re: Format Document: Leave line spacing alone and change indentation only? |
 |
Tue, 1 Apr 2008 10:03:08 +0000 |
Hi,
If we run the Format Document command in the Source View window, the Visual
Studio formats your tags just like you said.
You can try to custom tag line break formatting by Tools->Options->Text
Editor->Html->Format tab->Click Tag Specific Options->Click Client
HTML Tags->Select node->Set "Line Breaks" ->Click OK, and
then you can run Format Document command to format your tags.
I hope this helps.
|
| Post Reply
|
| Re: Format Document: Leave line spacing alone and change indentation only? |
 |
Thu, 3 Apr 2008 05:39:57 +0000 |
Are you saying I need to set specific line spacing for each HTML and ASP tag?
What I like about the c# formatting is that whether I decide I want 10 blank
lines or 1 blank line it leaves it alone.
|
| Post Reply
|
| Re: Format Document: Leave line spacing alone and change indentation only? |
 |
Thu, 3 Apr 2008 07:33:13 +0000 |
Hi,
Thanks for your response.
If we use this format command, the visual studio will apply the HTML source
formatting rules currently configured and clean up the HTML markup. As far as I
know, there is not such option that only indenting the content.
You can format the html source and then break line you want.
I hope this helps.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|