The Tools > Options > Text editor dialog box allows settings concerning the editing in a text editor. The following tabs are available:
oEditing
oText Area
oMargin
oMonitoring
Definition of undo, tabulator, indenting, folding, and so on, in the Editing tab of the Text editor dialog box
Number of undos |
Define how many editing steps should be saved. They can be undone by selecting the Undo function. |
Folding |
Define whether the code should be viewed as structured by folds. This means that sections specified by indented position or marked by a special comment are hidden in a fold. This fold can be opened or closed via by a mouse-click on the plus- or minus-sign on the left side of the folds header line. The options: oNone: No folding is performed. oIndent: The lines indented to the previous one are placed in a fold, which is headed by the preceding line. Examples: The lines between VAR and END VAR or between IF and END IF are indented, thus are packed in a fold indicated by a minus-sign in open and by the plus-sign in closed state. oExplicit: The code section to be packed in a fold must be marked explicitly by comment lines: Before the comment section, enter 3 open brackets {{{, after the comment section, enter 3 closed brackets }}}. The comment may contain additional text also. |
Word wrap |
oNone: The line can be filled endlessly. oSoft: The lines are broken at the boundary of the window. oHard: The lines will be broken after the number of characters defined by Wrap margin. (A value of zero means that the lines are wrapped at the window boundary). |
Tab width |
Tab width in number of characters. |
Keep tabs |
If activated: A space which has been entered using the TAB key according to the defined Tab width (see above) will not be resolved to single character spaces afterwards. Therefore, if the tab width is changed later, the existing tab spaces will be corrected so. |
Indent width |
Indent width used in case of AutoIndent (see below); that is the number of spaces at the beginning of a line. |
AutoIndent |
oNone: No automatic indenting. Editing always starts at the left margin of the text area of the editor. oBlock: oSmart: Code lines following a keyword (for example, VAR or IF) are automatically indented according to the Indent width defined above. oSmart with code completion: When you enter a keyword like for example, VAR or IF, the associated code lines following below are indented according to the Indent width defined above. Additionally, the terminating keyword is added (for example END_VAR or END_IF). |
Color and font definitions for the editing area of the text editor.
You can activate the following options in the Text area tab of the Text editor dialog box in order to have some visual assistance during editing.
Highlight current line |
The line where the cursor is placed, is highlighted with the color defined in the selection list. |
Matching brackets |
If the cursor is placed before or after a bracket ( or ) in a code line, the corresponding closing or opening bracket will be indicated by a rectangle which is colored as defined in the color selection field. Also, if the cursor is placed in the first or last line of a bracket scope, the corresponding line at the end or start of this scope is indicated also by a rectangle of this color. |
End of line markers |
The end of each editor line is marked by a small dash (-) of the defined color which is placed behind the last position which is occupied by a character or a white space. |
Wrap guide |
If a soft or hard word wrap is activated (see tab Editing), the defined wrap margin is indicated by a vertical line in the defined color. |
Caret color |
Color of the cursor caret. |
Selection color |
The selected area is highlighted with this color. |
Inactive |
Color of a selection when the corresponding window is not active (focus on another window). |
Folded line foreground |
The header of a closed, folded section of code lines is written in this color. |
Folded line background |
The header of a closed, folded section of code lines is highlighted in this color. |
Font |
Choose the font to be used in the text editor. Click the sample field to open the standard dialog box for setting the font. |
Examples for the settings in the text area dialog box
Definition of colors, font, mouse-click definitions concerning the area left to the editing area of the text editor.
The following options in the Margin tab of the Text editor dialog box concern the left margin of the editor view, which is separated by a vertical line to the editing area
Line numbering |
Line numbers are displayed in the declaration and in the implementation part of the view, each starting with the number 1 in the first line. |
Foreground color |
Color of the line numbers. |
Background color |
Color of the margin background. |
Highlight current line |
Color of the line number of the line that is being edited. |
Show bracket scope |
A bracket scope contains lines between corresponding keywords, such as between IF and END_IF. You can activate this bracket scope function by option Matching brackets in the tab Text area. If the cursor is placed before, after or within a corresponding keyword, the bracket scope will be indicated by a bracket in the margin area. |
Focused border color |
Color of the vertical separator line on the right side of the margin area in the active part of the editor. |
Unfocused border color |
Color of the vertical separator line on the right side of the margin area in the non-active part of the editor. |
Mouse actions |
Define which of the following actions should be performed when you execute the associated type of mouse-click on the plus- or minus sign before the header line of a fold. oNone: No action oSelect fold: The lines of the fold area are selected. oToggle fold: The first level of the fold is opened or closed. oToggle fold fully: All levels of a fold are opened or closed. Types of Mouse actions: Click, Shift-Click, Ctrl-Click, Alt-Click |
Enable inline monitoring |
Activate or deactivate inline monitoring. |
Monitoring foreground color |
From the selection list, choose a color for the writing in the monitoring fields. |
Monitoring background color |
From the selection list, choose a color for the background of the monitoring fields. |
Flow control foreground color |
From the selection list, choose a color for the writing in the monitoring fields at flow positions. |
Monitoring background color |
From the selection list, choose a color for the background of the monitoring fields at flow positions. |
Number of displayed digits |
Define how many decimal places (digits) should be maximally displayed in case of floating values. |
String length |
Define the number of characters maximally displayed in case of a string value. |
... sample |
Preview of the defined monitoring settings. |