When I look at a class file, I will frequently collapse it down to its method signatures. Maybe I want to scan the file for a particular method. Maybe I want to get an overview of what functionality the class contains. Could be any number of reasons. Ultimately it’s a quick way to minimize the noise and isolate what I really want to see.

In a C# class file, the noisiest bits - easily - are the XML comments that decorate everything from the class itself to all its containing methods and properties. But, no matter! Just a quick keyboard shortcut and poof! they’re squished down to a box just like this: /// <summary> ....

Yay!

Enter Visual Studio 2015. Now instead of this…

/// <summary> ...

…we get something closer to this:

/// <summary> This foo does bar by taking a blah, multiplying by a doh, and returning the thing...

Booooooooo.

I didn’t count, but it appears that the first 150 characters or so are displayed when XML comments are in the collapsed state. I found that enormously distracting, but near as I can tell it’s non-optional. So after doing my fair share of googling around for a fix or workaround of any sort and finding exactly none, I set out to create my own solution.

Behold! SquishyVS: The Visual Studio 2015 extension that turns this:

Before squishyVS

…into this:

After squishyVS

Ahhhhhh, now, isn’t that nicer?!

More details - including download and install instructions - are included in the GitHub readme. Check it out!


Post Script

To be fair, I have seen people write their comments like this…

/// <summary>This is a summary!</summary>

…instead of this…

/// <summary>
/// This is a summary!
/// </summary>

…specifically because they want to see additional text displayed when code is collapsed down. Those users probably rejoiced when they discovered the change in Visual Studio 2015. I have to wonder who’s in the minority.