To fold a code section, place the text insertion point within it, and choose View > Code Folding > Fold Current Block .
The folded portion of the code will be represented by an ellipsis icon. To unfold the block, click the ellipsis.
Folding and unfolding can also be performed by clicking in the vertical blue gutter, to the left of the line numbers. Dots in this gutter indicate folded sections. Darker shades of blue indicate the depth of deeply-nested code sections.
Check out the View > Code Folding sub-menu for additional code folding shortcuts, such as folding all blocks beyond a certain depth.