IntelliJ IDEA 13.1.0 Web Help

Code blocks have folding toggles at the right edge of the gutter next to each block. When a block is folded, the toggle foldingPlus appears to the left of the first line of the block. When a block is expanded, the toggle foldingMinusStart is shown at the beginning of the block and foldingMinusEnd at its end.

Folding and expanding code blocks works for entire classes, inner and anonymous classes, method bodies, import lists, comments, HTML and XML tags , closures and language injections .

To fold or expand a block of code, do one of the following
  • Click the toggles foldingPlus or foldingMinus.
  • Place the caret within the desired block, and choose Code | Folding | Collapse or Code | Folding | Expand on the main menu, or just press .
To fold or expand all blocks in a file, do one of the following
  • On the main menu, choose Code | Folding | Collapse All or Code | Folding | Expand All.
  • Press .


    Pressing once expands all blocks except the imports list. Repeating the keystroke expands the imports.

See Also


Web Resources: