Collapse all methods in Visual Studio Code [duplicate]
IT Nursery
April 27, 2022
0
In Visual Studio Professional, we have a shortcut key, Ctrl + MCtrl + O to collapse all methods and properties in a class. How can I do a similar thing in Visual Studio Code?
I know there are shortcut keys like Ctrl + Shift + [, but this does not meet the needs.
Is it possible to get the Visual Studio Professional-like behaviour in Visual Studio Code?
1Best Answer 11
Fold All:
Windows and Linux: Ctrl + KCtrl + 0
Mac: ⌘ + K⌘ + 0
Unfold All:
Windows and Linux: Ctrl + KCtrl + J
Mac: ⌘ + K⌘ + J
To see all available shortcuts in the editor:
Windows and Linux: Ctrl + KCtrl + S
Mac: ⌘ + K⌘ + S
All shortcuts kept up to date by the Visual Studio Code team: Visual Studio Code Shortcuts