HideShow Comments

Free

Hides comments and replaces them with a callout icon. The comments are shown as tooltip and when editing them.

(13) Review
Visual Studio
2013, 2012, 2010
Download (3,325)
1/27/2014
2.1.2
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (13)
Q and A (16)
Sign in to write a review
Sort by:

by ChaseCarlile | March 18 2014

The ability to change icons would make it more usable for me simply because the current ones don't quite work with my color scheme.

by Crantech Solutions Ltd | March 15 2014

Such a handy feature that is sorely lacking from the standard install of Visual Studio.

In my career as a developer, I have always strived towards best practice. One of these so-call best practices is around commenting the code that I write. One year I will argue the merits of writing nice long comment blocks before ever class and member that will support it. Other years I will follow the practice of documentation through well written names for all my elements.

Working as a contractor, it is often necessary to switch your stance based on the team decisions - or even Stylecop. This little tool allows me to not have to worry about the "right" way. I just wish that it was a part of Visual Studio or Resharper.

by docflabby | March 14 2014

Exactly what I was looking for...so many projects....so much meaningless auto generated XML help...

This cuts thought it all!

by Ricky.Stevens | January 09 2014

Legend! Thanks!

by s.wl | January 05 2014

Pretty useful extension !
It would be very greater if we could see different types of icon (shape, color...) depending on the comment nature :
- For instance XML doc with a green icon, other "classic" comments with a yellow one
- Adding some comment prefixes such as //! which indicates it is important so reduce it with a red icon
- Eventually been able to define our own prefixes and associate to a custom icon

Good work.
PS : If you plan to implement with other languages, don't forget F# :)

by Scott Beeson | November 04 2013

Seems cool, but does not work in javascript files which is what I needed

3dGrabber November 05 2013
| Edit |
Delete

"Works only for C# so far", clearly stated in the description.
I'm looking into supporting more languages in the future.

by t-graham | October 01 2013

Great job. These really should be standard functions in VS.

by Oren Trutner | September 09 2013

Fabolous -- thank you!

by Jan Roelof de Pijper | August 24 2013

This is bloody marvelous! Thank you very much for this contribution.
I try to be consistent with providing XML comments for documentation and tooltip help, but these comments do tend to make the code (much) less readable. This extension is a godsend for me.

Perfection for me would be reached if there was an option to (temporarily) hide commented lines completely, so without even the callout icon. For me this would make the (more compact) code even more readable.

Jan Roelof

by SixOThree | August 22 2013

A few quirks, but a very welcome addition to VS.

"Code should be self documenting" is fine for people reading my code; and that's what I strive to create. But the people consuming my classes should not have to read code to understand what it does. This affords me the best of both worlds.

by Marcel Popescu | July 18 2013

Fantastic - I work on a project where it seems like every statement is commented, it was driving me crazy. Thank you!!!

by André Luus | June 04 2013

My eyes are relaxing already! Thank you so much for this. So far on VS2012 it seems to work exactly as advertised, well done.

by joltcoder | May 16 2013

There are some bugs that make it a bit unstable... once it stabilizes this will get a full 5 star review from me...

Sign in to start a discussion


  • Feature Request: hide #if #endif
    1 Posts | Last post April 10, 2014
    • Hi 
      Could you please make to hide all not defined #if #endif also, they are so ugly http://i.imgur.com/T1oMt1G.png
      
      is there source code available?
  • Seems to conflict with Developer Express Design Time
    3 Posts | Last post April 07, 2014
    • Hi there.
      
      Nice job. I love the addin and concur with the comments (sic) about moving the icon down a line to claim back a little more screen real-estate.
      
      However, I've had to disable / re-install as its presence seems to cause DevExpress design time problem with Assembly resolution. (It's as if DevExpress can't find its design time dlls in the GAC).
      
      Windows 7 Professional SP1 x64, VS2012, DevExpress v2.1.16.0.
      
      Sean
      
      
    • Sorry - re-install should, of course, read uninstall!
    • I can reproduce this. Could not figure out yet, why it happens.
      I'm very busy with my day job atm, but I'll look into it as soon as I
      find some spare time.
  • Not working between conditional compilation symbols
    2 Posts | Last post April 07, 2014
    • Hi, thanks again for this great plugin !
      
      I have problem making it work between conditional compilation symbols.
      Typically, if I write :
      
      // Comment A
      #if DEBUG
      // Comment B
      #endif
      
      Only "Comment A" collapse, no matter the symbol DEBUG is defined or not.
      You can replay the bug by typing those lines in a new console application.
      
      My config : W8.1 x64, VS2013 U1, plugin version 2.1.2
      
      swl
    • Nice find, it's most probably a bug. 
      I'll check it, as soon I find some time...
  • Feature request - moving plugin icon outside the code
    3 Posts | Last post March 14, 2014
    • Hello, thank you for very good plugin! This is something I wanted to use for a long time and finally found it here :-).
      
      I have one thought about possible feature. When I have many documentation comments, that's good I can hide them all with this plugin. However, it still wastes one line for each comment that is hidden. Would it be possible (in the future versions, either by default or as configurable parameter) to move the icon that shows command hidden by your plugin without wasting that one line of screen?
      
      I mean, for example, by moving this icon to first line of code that is after the comment. Or moving it to that part of Visual Studio editor that is also intended for showing optional line numbers close to each line. What I want to mention is that I like to be able to see as much code on the screen at the same time as I can. And in this case you plugin makes it possible to limit number of lines wasted in editor but not to zero (there is still one line for each icon created by your plugin).
      
      By the way, the most common scenario for me it to hide all documentation comments and to leave all other commands turned on.
    • Thanks for the input.
      Moving the icon to the gutter is a neat idea, will consider...
      I also thought about use some text marker (underline?) on the documented Method/Class. The question with all these solutions is: how do you edit the comment?
      
      Opinions?
    • I second this suggestion. I think the gutter is too far away, so float the icon just to the left of the first non-whitespace character in the next line. If the user clicks it to edit, show the comment lines and instead of hiding the icon place it just to the left of the first non-whitespace character of the comment. If they click the icon again, the comment is again hidden. I.e., the icon is always there (although maybe there are two versions of the icon, one for Edit and one for Hide).
  • Height of the hidden lines
    1 Posts | Last post March 02, 2014
    • Hi,
      Great plugin, thanks!
      That would the best if it decreased the height of the hidden lines.
      More lines of code would be visible of the screen!
  • Error when run with VSCommands with VS2013.
    2 Posts | Last post February 25, 2014
    • Hi,
      
      This is a great extension, but I have a clash with the equally awesome VSCommands extension on VS2013 Ultimate. It works fine when that extension is disabled, but if they are both enabled I get the following errors in my ActivityLog:
      
        <entry>
          <record>665</record>
          <time>2014/02/25 13:31:07.197</time>
          <type>Information</type>
          <source>VisualStudio</source>
          <description>Begin package load [HideShow.Package.Package, HideShow.Package, Version=2.1.2.0, Culture=neutral, PublicKeyToken=96af82921a3c7625]</description>
          <guid>{EEF6B219-38CB-482A-9B2D-7582DF4AAF1E}</guid>
        </entry>
        <entry>
          <record>666</record>
          <time>2014/02/25 13:31:07.225</time>
          <type>Error</type>
          <source>VisualStudio</source>
          <description>SetSite failed for package [HideShow.Package.Package, HideShow.Package, Version=2.1.2.0, Culture=neutral, PublicKeyToken=96af82921a3c7625]</description>
          <guid>{EEF6B219-38CB-482A-9B2D-7582DF4AAF1E}</guid>
          <hr>80131511</hr>
          <errorinfo>Field not found: 'HideShow.Implementation.Integration.sdsdbswsdber.asdbvsdb'.</errorinfo>
        </entry>
        <entry>
          <record>667</record>
          <time>2014/02/25 13:31:07.227</time>
          <type>Error</type>
          <source>VisualStudio</source>
          <description>End package load [HideShow.Package.Package, HideShow.Package, Version=2.1.2.0, Culture=neutral, PublicKeyToken=96af82921a3c7625]</description>
          <guid>{EEF6B219-38CB-482A-9B2D-7582DF4AAF1E}</guid>
          <hr>80131511</hr>
          <errorinfo>Field not found: 'HideShow.Implementation.Integration.sdsdbswsdber.asdbvsdb'.</errorinfo>
        </entry>
        <!-- SNIP -->
        <!-- CONTINUED IN NEXT POST -->
      
    •   <entry>
          <record>671</record>
          <time>2014/02/25 13:31:08.129</time>
          <type>Error</type>
          <source>Editor or Editor Extension</source>
          <description>System.MissingMethodException: Method not found: &apos;System.IObservable`1&lt;!!0&gt; System.Reactive.Linq.Observable.ObserveOn(System.IObservable`1&lt;!!0&gt;, System.Reactive.Concurrency.IScheduler)&apos;.&#x000D;&#x000A;   at HideShow.Implementation.Tagger.avfavsa..ctor(ITextView ava, IOutliningManager sdb)&#x000D;&#x000A;   at HideShow.Package.CsCommentTaggerProvider.&lt;&gt;c__DisplayClass1.&lt;sdfsdfgh&gt;b__0()&#x000D;&#x000A;   at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator)&#x000D;&#x000A;   at HideShow.Package.CsCommentTaggerProvider.sdfsdfgh(ITextView svbsd, ITextBuffer asdg)&#x000D;&#x000A;   at HideShow.Package.CsCommentTaggerProvider.Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider.CreateTagger[T](ITextView textView, ITextBuffer buffer)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
        </entry>
  • HideShow exception from activity log
    2 Posts | Last post February 17, 2014
    •   <entry>
          <record>894</record>
          <time>2014/02/14 21:22:47.425</time>
          <type>Error</type>
          <source>Editor or Editor Extension</source>
          <description>System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at System.Reactive.PlatformServices.DefaultExceptionServices.Rethrow(Exception exception)&#x000D;&#x000A;   at System.Reactive.ExceptionHelpers.ThrowIfNotNull(Exception exception)&#x000D;&#x000A;   at System.Reactive.Linq.QueryLanguage.FirstOrDefaultInternal[TSource](IObservable`1 source, Boolean throwOnEmpty)&#x000D;&#x000A;   at System.Reactive.Linq.QueryLanguage.First[TSource](IObservable`1 source)&#x000D;&#x000A;   at System.Reactive.Linq.Observable.First[TSource](IObservable`1 source)&#x000D;&#x000A;   at HideShow.Implementation.Tagger.avfavsa.GetTags(SnapshotSpan span)&#x000D;&#x000A;   at System.Linq.Enumerable.&lt;SelectManyIterator&gt;d__14`2.MoveNext()&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__5.MoveNext()</description>
        </entry>
    • Thanks for submitting
  • Visual crashes when writing new comments
    5 Posts | Last post January 27, 2014
    • System: 
      Visual Studio 2013 Ultimate
      Windows 8.1
      (Dreamspark software)
      
      Steps to reproduce:
      1. Write some XML documentation for a method (///)
      2. Move a few lines up or down (out of the comment)
      3. Pres Crtl+* *
      4. The hidden comment symbol and the comment itself are both shown
      5. Type anything
      6. Visual crashes.
      
      Some steps can be even switched, e. g. when to press Crtl+* *.
      Also happens when Hide Comments is still turned on and writing a new comment.
      
      Workaround for me is currently just clicking on the hidden comment symbol when the comment is still shown or pressing Ctrl+* * multiple times after writing a new comment, but when i forget it visual crashes which is really not nice.
      
      I can write more steps to reproduce if needed but i think it's clear^^
    • I could fix this too, if you just told me where I can find the code / if you would make this open source :-)
      
      I mean, the license is already open source, isn't it?
    • Thanks for the report.
      Version 2.1 I guess?
      
      Unfortunately I cannot reproduce the error with VS 2013 Pro.
      Could you please post the log?
      
      Start devenv with the /log switch. 
      The log gets written to %APPDATA%\Roaming\Microsoft\VisualStudio\<version>\ActivityLog.xml
      
      
      
      
    • Nevermind, got it.
    • Fixed in 2.1.2
  • Not working on collapsed comments
    3 Posts | Last post January 24, 2014
    • Would it be possible to make this work on collapsed comments? I.o.w. after pressing CTRL+(M,O), I can't see the little callout. Seems like there is no existing addon to collapse everything except comments either.
    • The problem is, that the collapsible regions and Hide/Show are fighting for supremacy. The built-in regions win most of the time.
      I'll see what I can do for the next version.
    • fixed in 2.1
  • Crashes all the time
    5 Posts | Last post January 24, 2014
    • I installed the tool but it keeps throwing errors, both in VS2010 and 2012.
      
      Activity Monitor Log has these red lines:
      
      SetSite failed for package [HideShow.Package.Package, HideShow.Package, Version=1.0.1.0, Culture=neutral, PublicKeyToken=96af82921a3c7625]
      
      End package load [HideShow.Package.Package, HideShow.Package, Version=1.0.1.0, Culture=neutral, PublicKeyToken=96af82921a3c7625]
      
      System.TypeLoadException: Could not load type 'ICSharpCode.NRefactory.CSharp.dgfnmdfndfn' from assembly 'ICSharpCode.NRefactory.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=d4bfe873e7598c49'. at HideShow.Implementation.hwwegwebv..ctor(ITextView gwh) at HideShow.Package.CsCommentTaggerProvider.<>c__DisplayClass1.<CreateCSharpTagger>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at HideShow.Package.CsCommentTaggerProvider.CreateCSharpTagger(ITextView textView, ITextBuffer buffer) at HideShow.Package.CsCommentTaggerProvider.Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider.CreateTagger[T](ITextView textView, ITextBuffer buffer) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
    • I cant reproduce this. 
      Did you try to uninstall/reinstall?
      Do you use some other extension that uses NRefactory?
      
      Has anyone else this problem?
    • i also got the same error. probably conflict with either productivity power tools or vscommand(most likely this). apparently, i also install other plugins. resharper, visual assist among others.
    • @publicENEMY: Does the problem resolve when you temporarily disable vscommands?
      (tools->extensions->vscommands->disable)
      
      
    • fixed with 2.1
1 - 10 of 16 Items