Code Folding
Last modified: 22 July 2022File | Settings | Editor | General | Code Folding for Windows and Linux
PhpStorm | Settings | Editor | General | Code Folding for macOS
Ctrl+Alt+S
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 outline | Select this checkbox if you want the code folding toggles to be shown in the editor. Clear the checkbox to hide the toggles. |
Fold by default | Select the code fragments which should be folded by default, that is, when a file is first opened in the editor. |
Fold by Default section
In this section, choose the language-specific elements that should be folded by default when you open a file of the corresponding type.
Original | Folded | |
---|---|---|
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 See Use the Surround With action for details. |
|
|
Original | Folded | |
---|---|---|
One-line functions in JavaScript and TypeScript |
|
|
Object literals |
|
|
Array literals |
|
|
XML literals |
|
|
Original | Folded | |
---|---|---|
Class body |
|
|
Imports |
|
|
Method body |
|
|
Function body |
|
|
Tags |
|
|
HEREDOC/NOWDOC |
|
|
Original | Folded | |
---|---|---|
XML Tags |
|
|
HTML 'style' attribute |
|
|
XML entities |
|
|
Data URIs |
|
|
Thanks for your feedback!