How2停止VS2005重新格式化#region in Source Co [英] How2 Stop VS2005 Reformatting #region In Source Co

查看:66
本文介绍了How2停止VS2005重新格式化#region in Source Co的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS2005 2.0 Beta 2注意到我在
死区.vsnet.idetarget =_ blank> news://microsoft.public.vsnet.ide
我正在使用我的

裤子来讨论这个问题。


使用区域来管理IDE中的源代码是非常有用的,但是我希望
更喜欢在编辑器的最左边缘对齐区域文本,即

margin-left 0;就是这样。


如果我尝试按照我喜欢的方式格式化reqions,下面的示例显示了我更喜欢的内容以及VS2005如何重新格式化

区域。我想知道在工具>中是否有

方法选项我可能不会理解为可以用来阻止VS2005重新格式化源代码中的区域?
或者这是一个

的错误?


//示例通缉

#region这个区域用于等等等等等等>
...

...

#endregion


// VS2005重新格式化的示例

#region这个区域用于等等等等等等...
...

...

#endregion


<%= Clinton Gallagher

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

推荐答案

啊,VS格式化既是一种祝福,也是一种诅咒。我不认为

是解决问题的方法,除了手动移动区域和

小心不要再次重新格式化,或转向

完全格式化。

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.


我认为这是一种Dude;和它一起生活回答。


-

Bob Powell [MVP]

Visual C#,System.Drawing


Ramuseco Limited .NET咨询
http://www.ramuseco。 com


在Windows窗体中查找精彩的Windows窗体提示和技巧
http://www.bobpowell.net/tipstricks.htm

用GDI + FAQ回答那些GDI +问题
http://www.bobpowell.net/faqmain.htm


所有新文章都提供C#和VB.NET代码。

订阅所提供的RSS提要,绝不会错过任何新文章。


" clintonG" < CS ********* @ REMOVETHISTEXTmetromilwaukee.com>在消息中写道

news:uu ************** @ TK2MSFTNGP12.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注意到我已经在新闻中发布了(到目前为止无效)有点
死区://microsoft.public.vsnet.ide
我正在使用我的
裤子来讨论这个问题。

使用区域来管理IDE中的源代码是非常有用但是我更喜欢在编辑器的最左边缘对齐区域文本,

margin-left 0;就是这样。

如果我尝试按照我喜欢的方式格式化reqions,下面的示例显示了我更喜欢的以及VS2005如何重新格式化
区域。我想知道是否有

工具>中的方法选项我可能不会理解,可以用来阻止VS2005重新格式化源代码中的区域?或者这是一个
一个
错误吗?

//示例通缉
#region这个区域用于等等等等等等......
...
#endregion

// VS2005重新格式化的示例
#region这个区域用于等等等等等等......
.. 。
#endgion

<%=克林顿加拉格尔
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



因为我没有,它必须是一个错误早期版本中的问题。如果我删除了

空格,它会被重新格式化。希望这不会出现在最终的

版本中。我不会屏住呼吸:-)感谢您的评论...


<%= Clinton Gallagher


< ; WA ******** @ yahoo.com>在消息中写道

news:11 ********************** @ g47g2000cwa.googlegr oups.com ...
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...
啊,VS格式化既是一种祝福,也是一种诅咒。除了手动移动区域以及小心不要再次重新格式化或完全关闭
格式化之外,我认为没有解决问题的方法。
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.



这篇关于How2停止VS2005重新格式化#region in Source Co的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆