How2 Stop VS2005 Reformatting #region In Source Co

  • Thread starter Thread starter clintonG
  • Start date Start date
C

clintonG

VS2005 2.0 Beta 2 noting I've posted (to no avail so far) to the somewhat
deadzone at news://microsoft.public.vsnet.ide and am getting ants in my
pants for some discussion about this issue.

Using regions to manage source code in the IDE is very useful however I
prefer to align the region text on the left-most margin of the editor, i.e.
margin-left 0; that is.

The examples which follow show what I prefer and how VS2005 reformats the
region if I try to format the reqions the way I prefer. I wonder if there is
a method in Tools > Options I may not undetrstand that can be used to
prevent VS2005 from reformatting the regions in my source code? Or is this a
bug?

// Example Wanted
#region This region used for blah blah blah
...
...
#endregion

// Example Unwanted Reformatted By VS2005
#region This region used for blah blah blah
...
...
#endregion

<%= Clinton Gallagher
 
Ahh, VS Formatting is both a blessing and a curse. I don't think there
is a solution to your problem other than manually moving the region and
being careful not to cause a reformat to happen again, or to turn
formatting off entirely.
 
Its got to be a bug as I had no problem in earlier releases. If I remove
whitespace it gets reformatted. Hopefully this won't be present in the final
release. I won't be holding my breath :-) Thanks your your comments...

<%= Clinton Gallagher
 
What ever happened to the Dell guy anyway?
Did they at least let him keep his bong? :-)

<%= Clinton Gallagher
 
Clinton,

1st Don't be rude. Mr. Powell knows what he's talking about.
2nd How is code indentation a bug? Formatting is inherently a
preference thing and there is no wrong way to do it. If you don't like
what MS did then TURN IT OFF. I personally don't see why you wouldn't
want a region indented anyway.

Either way its hardly a big deal.
 
I've reported several bugs and suggested several improvments to the MSDN
Product Feedback Center and do so on an as needed basis.
I've set an alarm to remind me to send them a kite about this issue but
thanks for bringing it to the general attention of the ignorati who do not
know about this resource.

Even if they got rid of this bug which I recall was not present in earlier
releases -- or this 'design flaw' as the case may be -- nothing will be done
until ASP.NET 2.1 at the very latest so I think you'll understand that I
intend to wait until to see what is released November 7th.

<%= Clinton Gallagher
 
If I'm not mistaken, I could swear that I saw a small protrusion in Bob's
cheek, where I presume his tongue was firmly planted.

BTW, what's "marijuana?"

--

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
Back
Top