JetBrains Rider 2018.1 Help

Keymap:

Folding Code Elements

You can collapse (fold) code fragments reducing them to a single visible line. In this way, you can hide the details that, at the moment, seem unimportant. If and when necessary, the folded code fragments can be expanded (unfolded).

Folded code fragments, normally, are shown as shaded ellipses ().

Code folding means

You can collapse and expand code fragments by using:

Code folding toggles (, or ). These toggles are shown in the editor to the left of the corresponding folding regions. If a region is unfolded, indicates the beginning of the region while is located at its end. For folded regions, the toggle is shown as .

If you hold the Alt key and click , or , the region is collapsed or expanded recursively, i.e. along with all its subordinate regions.

Commands of the Folding menu and associated keyboard shortcuts. The Folding menu can be accessed from the main menu bar (Code | Folding), or as a context menu in the editor. The shortcuts are shown right in the menu. See Commands of the Folding menu and associated shortcuts.

Expand all the collapsed fragments in the file up to the specified nesting level

Expand doc comments

Expand all documentation comments in the current file

Collapse doc comments

Collapse all documentation comments in the current file

Fold Selection / Remove region

Ctrl+Period

Collapse the selected fragment and create a custom folding region for it to make it "foldable" / Expand the current fragment and remove the corresponding custom folding region to make the fragment "unfoldable"

Specifying code folding preferences

You can specify:

Whether the code folding toggles should be shown.

Which folding regions should be collapsed by default.

The corresponding settings are on the Editor | General | Code Folding page of JetBrains Rider settings (Ctrl+Alt+S).

Viewing folded code fragments

To see the contents of a folded fragment, point to the ellipsis that indicates that fragment.