Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a keyboard shortcut in Eclipse to fold the current method/block?

To expand on petrilli's answer:

  • Ctrl + Numpad_Multiply can also be used to expand all
  • Ctrl + Shift + Numpad_Divide is bound to collapse all
  • Ctrl + Numpad_Divide toggles folding on and off

And yes, they can all be rebound, if you know what text to filter on in Windows | Preferences | General | Keys.

"Folding", "Expand", "Collapse" are keywords that should get you all of the relevant commands.


By default they're bound to Ctrl + Numpad_Minus and Ctrl + Numpad_Plus, but you can rebind them.


If you are using eclipse-pydev then the default keybinds are

ctrl + 9 : collapse all one level

ctrl + 0 : expand all one level

ctrl + -_ : collapse current location

ctrl + =+ : expand current