Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio for Mac how to collapse regions and methods

I couldn't find a way to collapse/expand regions and sections from Visual Studio for Mac.

If someone could share how to do that, it would be very useful.

like image 724
Jzrzmy Avatar asked Jun 28 '17 15:06

Jzrzmy


People also ask

How do I Collapse All Methods in Visual Studio for Mac?

Windows and Linux: Ctrl + K Ctrl + 0. Mac: ⌘ + K ⌘ + 0.

How do I Collapse All Methods in Visual Studio?

(Ctrl+M, Ctrl+U) - Removes the outlining information for the currently selected user-defined region. Not available in Visual Basic. (Ctrl+M, Ctrl+O) - Collapses the members of all types. (C++) Collapses a region in the function containing the insertion point.

How do I collapse a region in Visual Studio?

Ctrl + M , Ctrl + L toggles all foldables recursively, from the top namespace down to the inner methods and comments.

How do you collapse a method in Visual Studio code?

How to Collapse All Source Code in VS Code? To fold all top-level and child elements of your code: Enter the command >fold and hit Enter.


1 Answers

You need to go to Preferences >> Text Editor >> General as on the image below and you will see Code Folding area.

Visual Studio for Mac Code Folding area

You can check whatever you need and you will see code folding blocks in your code.

like image 138
Denis Gordin Avatar answered Sep 22 '22 18:09

Denis Gordin