Intellij-idea – JetBrains / IntelliJ keyboard shortcut to collapse all methods

ideintellij-ideakeyboard shortcutsphpstorm

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 likely be shared across all of them) to collapse all the methods / functions so that only the method signatures are shown?

Something like this:

public String myMethod(String arg1, int arg2){...}

public String mySecondMethod(String arg1, int arg2){...}

Best Answer

You may take a look at intellij code folding shortcuts.

For Windows/Linux do: Ctrl+Shift+-

For mac use Command+Shift+-

To unfold again do Ctrl+Shift++ or Command+Shift++ respectivley.