Difference between revisions of "IDE Window: Editor Options Code Folding"

From Free Pascal wiki
Line 15: Line 15:
 
*  |  a vertical line is shown in front of lines that belong to a fold-able region, but are not the top line of such a region. The vertical line always begins under the [+] sign and continues to the last line of the block. On the last line it displays a tiny edge.
 
*  |  a vertical line is shown in front of lines that belong to a fold-able region, but are not the top line of such a region. The vertical line always begins under the [+] sign and continues to the last line of the block. On the last line it displays a tiny edge.
  
Fold-able blocks can be nested.
+
Fold-able blocks can be nested or overlapped.
  
 +
= Settings =
  
 +
== Code folding ==
  
 +
The checkbox on top globally enables or disables code folding. If disabled, the Gutter will not display the fold tree neither.
 +
 +
== Language specific options ==
  
 +
Currently code folding is only supported for Pascal Source
  
= Code folding =
+
Mark blocks of code and let the user fold them.  The checkbox will enable or disable code folding in the editor.
  
The checkbox on top globally enables or disables code folding. If disabled, the Gutter will not display the fold tree neither.
+
= Usage =
  
= Language specific options =
+
== Using the Mouse ==
  
Currently code folding is only supported for Pascal Source
+
== Using the Context Menu ==
  
Mark blocks of code and let the user fold them.  The checkbox will enable or disable code folding in the editor.
+
== Using Keyboard ==

Revision as of 23:44, 19 August 2009

  • You can get this dialog via:
Menu / Environment / Editor options / Code folding
Source editor / popup menu / Options ...


About

Code folding allows certain structure or blocks of text to be "collapsed". This will hide all but the first line of the block, and the first line will be marked with the folded-symbol "[...]" at the end of that line.

Code folding is done by using a special area in the Gutter which displays the code folding tree. In the tree you will find nodes at the lines were a fold-able region starts.

  • [-] denotes the beginning of a fold-able block, which is not yet folded. This is called an expanded block. Clicking on the [-] Symbol will fold (collapse) this block.
  • [+] denotes the beginning of a fold-able block, which is folded (hidden). This is called an collapsed block. Clicking on the [+] symbol will unfold (expand) this block.
  • | a vertical line is shown in front of lines that belong to a fold-able region, but are not the top line of such a region. The vertical line always begins under the [+] sign and continues to the last line of the block. On the last line it displays a tiny edge.

Fold-able blocks can be nested or overlapped.

Settings

Code folding

The checkbox on top globally enables or disables code folding. If disabled, the Gutter will not display the fold tree neither.

Language specific options

Currently code folding is only supported for Pascal Source

Mark blocks of code and let the user fold them. The checkbox will enable or disable code folding in the editor.

Usage

Using the Mouse

Using the Context Menu

Using Keyboard