How can I show(unfold) the hidden(folded) code in IntelliJ IDEA, as shown in the picture below, just using keyboard without touching the mouse?
In IntelliJ IDEA you can use to following shortcuts to fold/unfold code blocks:
By the way, in Settings → Editor → General → Code Folding you can specify the default folding behavior for a various situations (eg, imports , one-line methods , inner classes , @SuppressWarnings annotations , array literals , generic constructors and many others):
And even after that your folding/unfolding hotkeys listed above will work as well.
The only available option for your need (about import statements) is,
Move your pointer to (+) button on the left hand side of the statement so you can see the pointer changes to hand mark.
Then Ctrl + -
Find this for more info expanding/collapsing code. But this is more about blocks.
folding
Folding
actionExpand
and Collapse
should be visible now (with keymaps)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.