PhpStorm 8.0.2 Help

Keymap:

Folding and Expanding Code Blocks

Code blocks have folding toggles on 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.

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 ( Code | Folding ), or
as a context menu in the editor.

Keyboard shortcuts. The corresponding shortcuts are shown in the Folding menu.

Folding menu

Item

Shortcut

Description

Expand

Ctrl+NumPad+

Expand the current code block

Collapse

Ctrl+NumPad -

Collapse the current code block

Expand Recursively

Ctrl+Alt+NumPad+

Expand all sub-blocks within the current code block

Collapse Recursively

Ctrl+Alt+NumPad -

Collapse all sub-blocks within the current code block

Expand All

Ctrl+Shift+NumPad+

Expand all code blocks in the selected area, or in the current file if no area is selected

Collapse All

Ctrl+Shift+NumPad -

Collapse all code blocks in the selected area, or in the current file if no area is selected