Артур Гудиев
Артур Гудиев

Reputation: 1144

Fold/unfold code section back using Cntrl + Z in Intelij IDEA

When I fold some code blocks (e.g. for(){...} loop or if(){...}) I often need to unfold it back. But my cursor can be far from the original position. I would like to do it using Cntrl+Z hotkey. But it doesn't catches fold/unfold actions.

Is it possible to track folding actions so they can be canceled by Cntrl+Z

Upvotes: 0

Views: 51

Answers (2)

Code-Apprentice
Code-Apprentice

Reputation: 83527

You might be able to get something similar with the code navigation keys:

Ctrl-Alt-Left = go back to previous cursor position

Ctrl-Alt-Right = go to next cursor position

Alternatively, you can use the Back and Forward buttons on your mouse to navigate through your location history.

Upvotes: 1

Alexis Pavlidis
Alexis Pavlidis

Reputation: 1080

No, there is no such feature in Intellij. Folding/Unfolding are not captured as "real" actions.

Unforunately nothing is mention in their official documentation, nor the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor | General | Code Folding provide such feature.

Upvotes: 1

Related Questions