开发者

Disabling double line spacing in code folding in VS2010

I use the code folding commands in Visual Studio 2008 all the time - e.g.

ctrl + m, ctrl + o  (collapse all)
ctrl + m, ctrl + m  (toggle expand/collapse of code block)

Visual Studio 2010 has the "improvement" that folded code now has a white space line between one block and the next. e.g.

void function1()[+]{...}

void function2()[+]{...}

Instead of the VS2008 开发者_开发技巧way

void function1()[+]{...}
void function2()[+]{...}

Anyone know how to prevent VS2010 from adding this whiteline space - it's extremely irritating!

Update: it seems that lots of folks can't reproduce. but since this question has got 6 up votes to date, I'm assuming that there are those who can.

C# users report that they can't reproduce. I code in c++ exclusively and it's definitely a problem in c++. Maybe I'll post a report to m$...


I can't reproduce it. I'm using Visual C# 2010 Express.

namespace Bums
{
    class Bum1
    {
        void Lick1()
        {
            Lick2();
        }
        void Lick2()
        {
            Lick1();
        }
    }
    class Bum2
    {
        void Lick1()
        {
            Lick2();
        }
        void Lick2()
        {
            Lick1();
        }
    }
}

Disabling double line spacing in code folding in VS2010

(please no comments about how I should derive both classes from a base IBum interface)


I'm not sure if your specific issue is addressed by installing the Productivity Power Tools, but I just tested out the collapsed display in a C++ project in my install and it works as it used to in VS2008. The Productivity Power Tools add a lot of other nice little features and fix some irritations in VS2010 that make them worth having anyways.

Additional note: We're running VS2010 Ultimate, although I wouldn't expect the edition to matter.


Just to clarify, when you using 'ctrl + m, ctrl + o' or 'ctrl + m, ctrl + m' in visual studio 2010, then vs automatically add white space line between methods.

Suppose you have following class:

 public class VsSettings
 {
        void function1()
        {
        }
        void function2()
        {
        }
 }

And after click 'ctrl + m, ctrl + o' you see following:

 public class VsSettings
    {
        void function1()...

        void function2()...
    }

If so then try to reset visual studio settings(tools -> import and export settings) and disable external plugins(like resharper, etc..), because for me result always was following(with resharper enabled, without resharper, before settings reset, after settings reset):

  public class VsSettings
        {
            void function1()...    
            void function2()...
        }

Hope this help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜