Results 1 to 2 of 2

Thread: Collapse or Hide Comments only of VB.NET Code in Visual Studio

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2020
    Posts
    70

    Collapse or Hide Comments only of VB.NET Code in Visual Studio

    I’m working on a VB.NET project in Visual Studio and want to manage my code more effectively by hiding or collapsing only the comments. I’ve found some useful shortcuts and plugins, but I’m looking for a solution that doesn’t involve third-party plugins and works directly within Visual Studio.

    1. I know about the shortcut Ctrl + M,O which collapses all code sections, but it also collapses sections of code that are not comments.
    https://stackoverflow.com/questions/69284376/how-to-show-hide-comments-in-visual-studio- 2019

    2. I’ve come across various plugins that can collapse comments, but I’d prefer not to use them.
    a)https://marketplace.visualstudio.com...llapseComments
    b)https://marketplace.visualstudio.com...deShowComments

    Is there a built-in feature or a specific shortcut in Visual Studio that allows collapsing or hiding only comments in VB.NET code? If not, are there any workarounds or lesser-known methods within Visual Studio that might achieve this without relying on external plugins?

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Collapse or Hide Comments only of VB.NET Code in Visual Studio

    It's called "folding" .,.. and no, I don't think there's a way to do "just comments" out of the box. It's an all-or-nothing situation. That's why the plugins exist... to fill that void that's not covered by VS.

    What's wrong with using plugins?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width