Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# hide and unhide comments

Tags:

I am trying to find solution how to hide and unhide comments in VS2010. What i found is:

# region  comments for code #endregion 

and:

http://holyhoehle.wordpress.com/2010/01/17/hide-comments-in-visual-studio/

but this one is not working in VS2010 or i don't know how to...

So maybe any one can help and offer some solution how to hide comments like:

string x = "...." //comment 
like image 357
zee Avatar asked Jan 02 '12 00:01

zee


2 Answers

I made a Visual Studio extension that allows you to hide/show comments.
You can get it here:

for Visual Studio 2010-2013
for Visual Studio 2015-2017

like image 198
3dGrabber Avatar answered Oct 06 '22 00:10

3dGrabber


You can highlight them one by one, Right-click, and choose Outlining > Hide Selection.

The keyboard shortcut for that maneuver is Ctrl+M, Ctrl+H.

like image 21
rfmodulator Avatar answered Oct 06 '22 00:10

rfmodulator