WebStorm 2024.3 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 arrows

Display code folding icons in the editor.

From the list, select the way in which the icons for unfolded areas should be displayed:

  • Always: code folding icons are always displayed in the gutter.

  • On mouse hover: code folding icons appear only when you hover over the gutter.

Code folding

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.

  • 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: 17 October 2024