Yes, you can enable folding in editor and specify levels of folding and which portion of code needs to be folded. To enable and configure folding/unfolding, perform these steps.
The Preferences dialog box appears.
Now you can fold/unfold portions in your source code, as the figure listed below shows. The fold/unfold functionality is added with new markers (+/-) at the left side in the source file. This improves readability of the source code.
To preview what is inside a folded region, you do not need to unfold it again. Hover your mouse cursor over a folded region and a popup appears displaying the details.