Dialog ‘Options’ - ‘Text editor’

Symbol:

Function: This dialog contains settings for working in a text editor.

Call: Menu bar: Tools ‣ Options ; category: Text editor.

Tab ‘Edit’

Number of undo steps Maximum number of editing steps to which you can apply the command Edit ‣ Undo .
Structure

Defines the structuring of the code through indentations.

If you select an indentation, you can expand or collapse the indentation section with the help of a plus or a minus sign respectively before the first line of the respective section.

  • Indentation: CODESYS summarizes all lines that are indented in comparison with the preceding line in an indentation unit.
  • Explicit: You mark explicitly the code section to be summarized in an indentation unit with comments. Before the section, there must be a comment containing 3 opening braces “{{{”. After the section, there must be a comment containing 3 closing braces “}}}”. The comments can contain additional text. Example:

Word wrap
  • Soft: The word wrap takes place at the edge of the editor window if 0 is entered for wrap point.
  • Hard: The word wrap takes place after the number of characters specified for the Wrap point.
Tab size Number of characters
Retain tabs : The empty space that you inserted with the Tab key is not resolved into spaces afterwards by CODESYS.
Indentation size If you have activated the option Automatically indentIntelligent or Intelligent with code completion, CODESYS inserts the number of spaces at the beginning of the line.
Automatically indent
  • Do not automatically indent
  • Block: A new line automatically applies the indentation of the preceding line.
  • Intelligent: Lines that follow a line containing a keyword (for example VAR) are automatically indented by the specified indentation size.
  • Intelligent with code completion: Indentation as with the option Intelligent, but CODESYS additionally inserts the concluding keyword (for example END_VAR).

Tab ‘Text area’

Associated parentheses If the cursor is positioned before or after a parenthesis within a code line, CODESYS marks the associated closing or opening parenthesis with a frame in the set color.
Line markings CODESYS marks the end of each editor line with a small dash in the set color behind the last character (including spaces) of the line.
Word wrap point If a soft or hard word wrap is activated, the defined word wrap point is indicated by a vertical line in the selected color.
Caret color Color of the cursor character
Selection color Color of the selected text area
Inactive Color of a selection when the corresponding window is not active (focus on another window).
Foreground reduced line Color of the header of a closed, indented section in the code
Background reduced line The header of a closed, indented section in the code is given a colored background
Font A click the field opens the common dialog for the configuration of the font.

Tab ‘Border’

Settings for the left-hand border of the text editor window, which is separated from the input area by a vertical line:
Number lines Display of the line numbers in the declaration and implementation part, in each case starting with 1
Foreground color Color of the line numbers
Background color Color of the border
Parenthesization

A parenthesization encompasses the lines between the keywords that open and close a construct, for example IF and END_IF.

If this option is activated and the cursor is located before, after or in one of the keywords of a construct, the parenthesization area is indicated by a square parenthesis in the border. You can select the color of the parenthesization from the drop-down list of this option.

Active border color Color of the dividing line between the border and input area
Inactive border color Color of the dividing line between the border and input area of the part of the window that is presently inactive
Mouse actions

You can assign one of the following actions to each of the specified mouse actions or mouse button combinations. CODESYS executes the actions when you execute the mouse action on the plus or minus sign before the header of a parenthesized area:

  • Select structure: CODESYS selects all lines of the parenthesized area.
  • Switch over structure: CODESYS opens or closes the parenthesized area or, if there are nested parenthesizations, the first level of the parenthesized area.
  • Completely switch over structure: CODESYS opens or closes all levels of a nested parenthesized area.

Tab ‘Monitoring’

Settings for the display of the monitoring fields
Enable inline monitoring Display of the monitoring fields behind the variables in online mode
Monitoring foreground color Display of the value in the monitoring field
Monitoring background color Display of the background in the monitoring field
Flow control foreground color Display of the value in the monitoring fields at the flow control positions
Flow control background color Display of the background in the monitoring fields at the flow control positions
Number of places displayed Number of decimal places in the monitoring field
String length Maximum length of string variable values in the monitoring field

See also