skip to Main Content

Currently, if I want to collapse all the content of all my .cs files in a project, I have to open each file individually and press CTRL + M, A. This process is quite tedious and time-consuming.

Is there a faster way to collapse all the code across all files in a project?

I’d prefer not to write a custom Visual Studio extension since I’ve never created one before and would rather focus on other tasks right now. However, if it’s a relatively simple and straightforward process, I’d be open to giving it a try.

Specific questions:

  1. Is there an existing extension that offers this functionality?
  2. Are there alternative shortcuts or semi-automatic methods to achieve this?
  3. Could it be done via terminal command, perhaps with Open
    in Terminal or a similar approach?

Any guidance or suggestions would be greatly appreciated!

2

Answers


  1. Use this shortcut to it:

    CTRL+M+O

    You can go in Edit/Outlining/Colopse to Definions.

    Not in all files, but is just one command and you collpse all your code.

    Login or Signup to reply.
  2. Is there a faster way to collapse all the code across all files in a project?

    I’m afraid not. Looks like there are no built-in keyboard shortcuts or menu command to achieve it up to now after do some searching.

    I would suggest you could raise a feature request.
    That will allow you to directly interact with the appropriate product group, and make it more convenient for the product group to collect and categorize your suggestions.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search