Code folding lets you collapse (fold) code blocks, reducing them to a single visible line. In this way, you can hide the details that, at the moment, seem unimportant. If and when necessary, the folded code blocks can be expanded (unfolded).
Folded code blocks are shown as shaded ellipses.
You can fold (collapse) and unfold (expand) code blocks by using:
-
Code folding toggles
(
,
or
). These toggles are shown in the editor on the left of the corresponding blocks. If a block is unfolded,
indicates the beginning of the block while
is located at its end. For folded blocks, the toggle is shown as
.
If you hold the Alt modifier and click a toggle button in the gutter, the code block will be collapsed or expanded recursively, i.e. all sub-blocks within the parent block will also be collapsed or expanded.
- Commands of the Folding menu. The Folding menu can be accessed from the main menu bar ( ), or as a context menu in the editor.
- Keyboard shortcuts. The corresponding shortcuts are shown in the Folding menu.
Folding menu
In this section: