WebStorm 2023.1 Help

Code Folding

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.

Show code folding arrows in the editor gutter (the new UI)

Select this checkbox if you want the code folding toggles to be shown in the editor's gutter. Clear the checkbox to hide the toggles.

Selecting the Show bottom arrows option, will display the folding bottom arrows in the gutter as well.

Fold by default

Select the code fragments which should be folded by default, that is, when a file is first opened in the editor.

  • File header

  • Imports

  • Documentation comments

  • Method bodies

  • Custom folding regions - code fragments within //<editor-fold desc="Description>//</editor-fold> or //region Description //endregion comments. Learn more from Custom folding regions.

  • Handlebars and Mustache blocks injections

  • JavaScript - language-specific code fragments in JavaScript and TypeScript

  • XML - language-specific code fragments in XML

Last modified: 22 February 2023