Hide comments in Visual Studio

How often have I wished that there was an option in Visual Studio to hide the comments in the source code. Comments are great, no doubt. And every programmer should well comment his code. However, sometimes they can be a bit annoying and block the sight on the actual code. Mainly if I want to comprehend or refactor a piece of code, it would be nice to have an option to toggle all comments off, especially when it’s my own code. 😉

In short, I wrote a little Add-In for Visual Studio that does just that. Actually it does not really toggle the comments on and off, in fact it sets the text color equal to the background color. It’s probably not the best solution, but it does serve the purpose for now.

It can be downloaded here.

I didn’t make an installer for the Add-In, so you just have to put the unpacked files into your %VSMYDOCUMENTS%\Addins folder where %VSMYDOCUMENTS% usually points to “C:\Users\<UserName>\Documents\Visual Studio 2008”.

You will then see a new button in context menu:

And in the Tools menu to edit the options:

There you can specify what kind of comments should be affected.

%d bloggers like this: