Using Code Folding
Code folding involves collapsing or "folding" Maple elements so that they take up less space in the file.
If Code Folding is enabled, minus signs will appear in the Annotation Bar next to code blocks which can be folded.
Folding a Block of Code
To fold a block of code:
Stand within a module or procedure.
Click the minus sign on the marker bar to the left of the editor.
The first line of code will remain visible but the other lines will not be displayed. A fold indicator will appear at the end of the line when the code is folded to indicate that there is hidden code.
To temporarily view folded code, hover over the plus sign that denotes a folded block. The folded code will be displayed in a floating block.
Note: Line numbers are folded together with the code. Folding and unfolding does not change line numbers, it can only hide/display them.
Unfolding a Block of Code
To unfold a block of code:
Click the plus sign.
The folded code will become visible again and the fold indicator will disappear.
To view the scope of a fold:
Hover over the minus sign.
A vertical line will be displayed from the first to the last line of the fold, indicating its range.
Note: If the folded code contains an error, the displayed window will be syntax highlighted on both the left and right Annotation bars.
Folding/Unfolding Nested Elements
To fold/unfold nested element:
Click on one of the minus signs of a nested element. All levels below this level will be folded into it. You can continue to fold until all levels have been folded into the topmost level.
To unfold nested elements, click on the plus sign. The folded code will open in the same order that it was folded.