[Done] Shortcut to fold/unfold all the code in the IDE editor

Some improvements:

When clicking the fold code icon in the margin:

  • normal click - fold/unfold the code block
  • shift + click - nested fold/unfold the code block
  • alt + click - fold/unfold all other code blocks

(if you do shift + click followed by a normal click you see the class and only the function definitions)

Additional shortcuts (Ctrl on windows)

  • Cmd + Alt + k, Cmd + Alt + 0: Fold All Code Recursively
  • Cmd + Alt + k, Cmd + Alt + 1: Fold level 1
  • Cmd + Alt + k, Cmd + Alt + 2: Fold level 2
  • Cmd + Alt + k, Cmd + Alt + 3: Fold level 3
  • Cmd + Alt + k, Cmd + Alt + 4: Fold level 4
  • Cmd + Alt + k, Cmd + Alt + 5: Fold level 5
  • Cmd + Alt + k, Cmd + Alt + 6: Fold level 6
  • Cmd + Alt + k, Cmd + Alt + [: Fold Region Recursively
  • Cmd + Alt + k, Cmd + Alt + ]: Unfold Region Recursively
  • Cmd + Alt + k, Cmd + Alt + -: Fold All except selected region
  • Cmd + Alt + k, Cmd + Alt + j: Unfold All

As before:

  • Ctrl-Shift-[ (Cmd-Alt-[ on macOS): foldCode.
  • Ctrl-Shift-] (Cmd-Alt-] on macOS): unfoldCode.
  • Ctrl-Alt-[: foldAll.
  • Ctrl-Alt-]: unfoldAll.
4 Likes