Code Folding
File | Settings | Editor | General | Code Folding for Windows and Linux
PhpStorm | Settings | Editor | General | Code Folding for macOS
CtrlAlt0S
Use this page to specify the default code folding settings. For shortcuts on how to expand or collapse code elements, refer to the code folding section.
Item | Description |
---|---|
Show code folding arrows | Display code folding icons in the editor. From the list, select the way in which the icons for unfolded areas should be displayed:
![]() Gif Show bottom arrows: display the bottom folding arrows in the gutter as well. Otherwise, only the top arrows are shown. |
Fold by default | Select the code fragments that should be folded by default, that is, when a file is first opened in the editor. |
In this section, choose the language-specific elements that should be folded by default when you open a file of the corresponding type.
Option | Unfolded code | Folded code |
---|---|---|
File header Applies to Header comment blocks. |
|
|
Imports Applies in non-PHP contexts such as JavaScript. |
|
|
Documentation comments |
|
|
Method bodies Applies in non-PHP contexts such as JavaScript. |
|
|
Custom folding regions Folds regions that are marked with For more information, refer to Custom folding regions. |
|
|
Option | Unfolded code | Folded code |
---|---|---|
One-line functions in JavaScript and TypeScript |
|
|
Object literals |
|
|
Array literals |
|
|
XML literals |
|
|
Option | Unfolded code | Folded code |
---|---|---|
Class body |
|
|
Imports |
|
|
Method body |
|
|
Function body |
|
|
Tags |
|
|
HEREDOC/NOWDOC |
|
|
Attribute |
|
|
Attribute list |
|
|
Option | Unfolded code | Folded code |
---|---|---|
Put underscores inside numeric literals (6-digit or longer) |
|
|
Option | Unfolded code | Folded code |
---|---|---|
XML Tags |
|
|
HTML 'style' attribute |
|
|
XML entities |
|
|
Data URIs |
|
|
Thanks for your feedback!