Search code examples
intellij-ideafolding

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


Solution

  • 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.