I\'m working on some legacy code that has a class that is 10,000+ lines of code and has 100s of methods. Is there a shortcut for any JetBrains IDE (since the shortcut would
The above suggestion of Ctrl+Shift+- code folds all code blocks recursively. I only wanted to fold the methods for my classes.
Code > Folding > Expand all to level > 1I managed to achieve this by using the menu option Code > Folding > Expand all to level > 1.
I re-assigned it to Ctrl+NumPad-1 which gives me a quick way to collapse my classes down to their methods.
This works at the 'block level' of the file and assumes that you have classes defined at the top level of your file, which works for code such as PHP but not for JavaScript (nested closures etc.)