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 icons to be shown in the gutter. Clear the checkbox to hide the icons. |
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:
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. |
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.
General
Option | Unfolded code | Folded code |
---|---|---|
Imports Folds the | ||
Documentation comments Folds multiline comments. | ||
Method bodies Folds code in methods. | ||
Custom folding regions Folds regions that are marked with For more information, refer to Use the Surround With action. |
Go
Option | Unfolded code | Folded code |
---|---|---|
One-line 'if' blocks with a single 'return' You can select a style of how you want to fold single-line return statements. You can select between two styles: if err != nil { return err } and if err != nil : err ⤴. | ||
One-line 'if' blocks with a single 'panic' You can select a style of how you want to fold single-line panic statements. You can select between two styles: if err != nil { panic("error") } and if err != nil : "err" ⤴. | ||
One-line 'if' blocks for error handling Fold blocks that handle error and consist of a single line. | ||
One-line functions with a single 'return' | ||
One-line case clauses | ||
Formatted strings |
JavaScript
Option | Unfolded code | Folded code |
---|---|---|
One-line functions in JavaScript and TypeScript | ||
Object literals | ||
Array literals | ||
XML literals |
SQL
Option | Unfolded code | Folded code |
---|---|---|
Put underscores inside numeric literals (6-digit or longer) |
XML
Option | Unfolded code | Folded code |
---|---|---|
XML Tags | ||
HTML 'style' attribute | ||
XML entities | ||
Data URIs |
<img src="data:image/png;
base64,
2P4//8/w38gljNBAAO9TXL0Y4O"/>
|
<img src="data:"/>
|