SublimeText3 Fold/Unfold all methods

后端 未结 4 1110
无人及你
无人及你 2021-02-04 23:55

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

4条回答
  •  既然无缘
    2021-02-05 00:53

    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.

提交回复
热议问题