Difference between revisions of "IDE Window: Divider Drawing"

From Free Pascal wiki
Jump to navigationJump to search
(Add linked menu navigation breadcrumbs)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
<noinclude>{{IDE Window: Divider Drawing}}<!--- This page may be used as template in other pages ---></noinclude>
 +
 +
== Navigation ==
 +
 +
You can reach this dialog from the Lazarus IDE:
 +
 +
* [[Main menu|Main Menu]] > [[Main menu#Tools|Tools]] > [[IDE Window: IDE Options Dialog|Options]] > [[IDE Window: Editor Options|Editor]] > Divider drawing
 +
* Source Editor popup context menu > Options... > Editor > Divider drawing.
 +
 
== Divider Drawing ==
 
== Divider Drawing ==
  
This is a page on the options dialog for the source editor.
+
The source editor draws horizontal dividers between blocks off code helping the programmer to quickly see where a block starts and ends. What a block is can be defined in detail for each language and block type.
 +
 
 +
To see see how the editor look with divider drawing enabled, have a look [[New_IDE_features_since#divider_lines_in_editor|here]].
 +
 
 +
Divider lines can be configured on a detailed level.<br>
 +
For example you can choose to have a divider after every top-level procedure/function. (set the level to 1)
 +
Or you can include nested functions up to a desired level. (level >= 2)
  
The source editor draws horizontal dividers between blocks helping the programmer to quickly see where a block starts and ends. What a block is can be defined in detail for each language and block type.
+
You can have dividers after the following logical breaks
 +
*Unit Sections: implementation, interface, initialization, ...
 +
*Uses Clause: In case it gets multi line
 +
*Var/Type: any var/type/const block on top-level (not in a procedure)
 +
*Var/Type(local): any var/type/const inside a procedure
 +
*:::The nest level indicates how deeply the *procedure* is nested (as var blocks can not nest themselves)
 +
*Class/Struct: Class/Record or Object declarations. The nest level is for records defined inside a class.
 +
*Class/Struct(local): same if used inside a type declaration local to a procedure
 +
*Procedure/Function:
 +
*Begin/End: Includes Case/Repeat, but not try/except. The nesting is counted to the containing Procedure
 +
*Try/Except:
  
To see see how the editor look with divider drawing enabled, have a look [[New_IDE_features_since#divider_lines_in_editor|here]].
+
Note:
 +
* unfinished blocks (open begin with no end) can fool the highlighter.
 +
* blocks that finish on the same line, on which the opened are ignored

Latest revision as of 12:27, 15 February 2021

English (en)

Navigation

You can reach this dialog from the Lazarus IDE:

Divider Drawing

The source editor draws horizontal dividers between blocks off code helping the programmer to quickly see where a block starts and ends. What a block is can be defined in detail for each language and block type.

To see see how the editor look with divider drawing enabled, have a look here.

Divider lines can be configured on a detailed level.
For example you can choose to have a divider after every top-level procedure/function. (set the level to 1) Or you can include nested functions up to a desired level. (level >= 2)

You can have dividers after the following logical breaks

  • Unit Sections: implementation, interface, initialization, ...
  • Uses Clause: In case it gets multi line
  • Var/Type: any var/type/const block on top-level (not in a procedure)
  • Var/Type(local): any var/type/const inside a procedure
    The nest level indicates how deeply the *procedure* is nested (as var blocks can not nest themselves)
  • Class/Struct: Class/Record or Object declarations. The nest level is for records defined inside a class.
  • Class/Struct(local): same if used inside a type declaration local to a procedure
  • Procedure/Function:
  • Begin/End: Includes Case/Repeat, but not try/except. The nesting is counted to the containing Procedure
  • Try/Except:

Note:

  • unfinished blocks (open begin with no end) can fool the highlighter.
  • blocks that finish on the same line, on which the opened are ignored