- Click the toggles or .
- Place the caret within the desired block, and choose Ctrl+Plus/Minus . or on the main menu, or just press
Code blocks have folding toggles at the right edge of the gutter next to each block. When a block is folded, the toggle appears to the left of the first line of the block. When a block is expanded, the toggle is shown at the beginning of the block and at its end.
Folding and expanding code blocks works for entire classes, method bodies, import lists, comments, HTML and XML tags .