I am using SublimeText3 for C++ and Java. I am wondering if there is a way to fold all of the methods in a file / class, and then unfold them all, regardless of where the caret
Open the console (View -> Console
or Ctrl`) with a source code file focused and enter the following commands at the bottom:
view.run_command("fold_all")
view.run_command("unfold_all")
to see their effect.
These commands can be bound with custom key bindings or put into the Command Palette for easy use.