468,792 Members | 1,779 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,792 developers. It's quick & easy.

How2 Stop VS2005 Reformatting #region In Source Co

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
Nov 17 '05 #1
12 1201
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.

Nov 17 '05 #2
I think this is a kind of "Dude; live with it" kind of answer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
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

Nov 17 '05 #3
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

<wa********@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
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.

Nov 17 '05 #4
What ever happened to the Dell guy anyway?
Did they at least let him keep his bong? :-)

<%= Clinton Gallagher
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
I think this is a kind of "Dude; live with it" kind of answer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uu**************@TK2MSFTNGP12.phx.gbl...
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


Nov 17 '05 #5
I don't have even the remotest idea of to what you're referring...

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:eV**************@TK2MSFTNGP12.phx.gbl...
What ever happened to the Dell guy anyway?
Did they at least let him keep his bong? :-)

<%= Clinton Gallagher
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
I think this is a kind of "Dude; live with it" kind of answer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:uu**************@TK2MSFTNGP12.phx.gbl...
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



Nov 17 '05 #6
http://www.tvacres.com/admascots_stevendelldude.htm

He would have said "Dude, live with it"....

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I don't have even the remotest idea of to what you're referring...

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:eV**************@TK2MSFTNGP12.phx.gbl...
What ever happened to the Dell guy anyway?
Did they at least let him keep his bong? :-)

<%= Clinton Gallagher
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
I think this is a kind of "Dude; live with it" kind of answer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:uu**************@TK2MSFTNGP12.phx.gbl...
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



Nov 17 '05 #7
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.

Nov 17 '05 #8
clintonG wrote:
Hopefully this won't be present in the final release. I won't be holding my breath :-)


Perhaps if you post your concerns in the proper place (i. e. the
Microsoft Feedback site) then something might be done about it.

http://lab.msdn.microsoft.com/productfeedback/

Nov 17 '05 #9
The term 'dude' reminded me of the guy who was doing Dell's TV commercials.
He used to say stuff like "Get a Dell dude" but Michael Dell had him fired
him after it was discovered he smoked some marijuana. Where are you from?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I don't have even the remotest idea of to what you're referring...

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:eV**************@TK2MSFTNGP12.phx.gbl...
What ever happened to the Dell guy anyway?
Did they at least let him keep his bong? :-)

<%= Clinton Gallagher
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
I think this is a kind of "Dude; live with it" kind of answer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:uu**************@TK2MSFTNGP12.phx.gbl...
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



Nov 17 '05 #10
Thanks for finding that Ryan.

<%= Clinton Gallagher

"Ryan Schreiber" <ry**@schreiber.com> wrote in message
news:rO********************@is.co.za...
http://www.tvacres.com/admascots_stevendelldude.htm

He would have said "Dude, live with it"....

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I don't have even the remotest idea of to what you're referring...

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:eV**************@TK2MSFTNGP12.phx.gbl...
What ever happened to the Dell guy anyway?
Did they at least let him keep his bong? :-)

<%= Clinton Gallagher
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
I think this is a kind of "Dude; live with it" kind of answer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:uu**************@TK2MSFTNGP12.phx.gbl...
> 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
>



Nov 17 '05 #11
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
"Chris Dunaway" <du******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
clintonG wrote:
Hopefully this won't be present in the final release. I won't be holding
my breath :-)


Perhaps if you post your concerns in the proper place (i. e. the
Microsoft Feedback site) then something might be done about it.

http://lab.msdn.microsoft.com/productfeedback/

Nov 17 '05 #12
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.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uf**************@TK2MSFTNGP10.phx.gbl...
The term 'dude' reminded me of the guy who was doing Dell's TV
commercials. He used to say stuff like "Get a Dell dude" but Michael Dell
had him fired him after it was discovered he smoked some marijuana. Where
are you from?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/


"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I don't have even the remotest idea of to what you're referring...

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:eV**************@TK2MSFTNGP12.phx.gbl...
What ever happened to the Dell guy anyway?
Did they at least let him keep his bong? :-)

<%= Clinton Gallagher
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:um**************@TK2MSFTNGP14.phx.gbl...
I think this is a kind of "Dude; live with it" kind of answer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:uu**************@TK2MSFTNGP12.phx.gbl...
> 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
>



Nov 17 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by lafleur | last post: by
3 posts views Thread by Chris Lane | last post: by
6 posts views Thread by Abhishek Srivastava | last post: by
9 posts views Thread by Larry Charlton | last post: by
3 posts views Thread by ohnoonho | last post: by
12 posts views Thread by docschnipp | last post: by
3 posts views Thread by Paul E Collins | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.