Skip to main content

Dialog: Options: Text editor

Symbol: _cds_icon_option_text_editor.png

Function: The dialog contains settings for displaying a text editor and working in it.

Call: Tools → Options command, Text editor category

Tab: Theme

On this tab, you set the desired "theme" in the interface design of the ST editor.


Color theme for the text editor

The selected theme is displayed in the Preview window. The available color schemes are stored in the installation directory in the Themes folder.

Tab: Editing

Number of undos

Maximum number of editing steps to which you can apply the Edit → Undo command


Defines the structuring of the code by indentation

When you select an indentation, you can expand or collapse the indentation section by means of a plus and minus sign in front of the first line of each section.

  • Indent: CODESYS combines all lines, which are indented in relation to the preceding line, into one indentation unit.

  • Explicit: You mark the code segment explicitly with comments that should be combined in one indentation unit: A comment with three opening braces "{{{" has to be before the segment, and a comment with three closing braces "}}}" has to be after the segment. The comments can contain additional text. Example:


Word wrap

  • Soft: The line break occurs at the edge of the editor window when 0 is specified for Wrap margin.

  • Hard: The line break occurs after the number of characters specified for Wrap margin.

Tab width

Number of characters

Keep tabs

_cds_icon_option_activated.png: CODESYS does not break up the spacing, which you have inserted by means of the Tab key, into individual spaces afterwards.

Indent width

If you have selected Smart or Smart with code completion for the AutoIndent option, then CODESYS inserts the number of spaces at the beginning of the line.


  • None

  • Block: A new line automatically applies the indentation of the previous line.

  • Smart: Lines that follow a line which contains a keyword (for example, VAR) indent automatically by the specified Indent width.

  • Smart with code completion: Indentation as in the case of the Smart option, but CODESYS also inserts the closing keyword (for example, END_VAR).

Tab: Text Area

Highlight current line

_cds_icon_option_activated.png: The line where the cursor is located is highlighted.

Matching brackets

_cds_icon_option_activated.png: When the cursor is positioned before or after a bracket within a line of code, the corresponding closing or opening bracket is marked by a frame.

End of line markers

_cds_icon_option_activated.png: The end of each editor line is marked by a small dash after the last character (including spaces) of the line.

Wrap guide

_cds_icon_option_activated.png: When a soft or hard line break is selected, the defined line break position is displayed with a vertical line.


Clicking the field opens the default dialog for configuring the font.

Tab: Margin

Settings for the left margin of the text editor window, which is separated from the input area by a vertical line

Line numbering

_cds_icon_option_activated.png: The declaration and implementation parts of the editor are numbered on the left, each beginning with 1.

Highlight current line

_cds_icon_option_activated.png: The line number of the line where the cursor is located is highlighted.

Show bracket scope

_cds_icon_option_activated.png: Brackets include the lines between the keywords which open and close a construct (for example, IF and END_IF). When the option is selected and the cursor is positioned before, after, or in one of the keywords of a construct, the bracket area is displayed with a square bracket in the margin.

Mouse Actions

You can assign one of the following actions to each of the specified mouse actions or mouse/keyboard combinations. CODESYS performs the selected action when you move the mouse to the plus or minus sign in front of the header of a bracketed area:

  • None: The mouse action does not trigger an action.

  • Select fold: CODESYS selects all lines of the bracketed area.

  • Toggle fold: CODESYS opens or closes the bracketed area, or if there are nested brackets, then the first level of the bracketed area.

  • Toggle fold fully: CODESYS opens or closes all levels of a nested, bracketed area.

Tab: Monitoring

Settings for displaying the monitoring fields

Enable inline monitoring

_cds_icon_option_activated.png: Display of the monitoring fields after the variables in online mode

Number of displayed digits

Number of displayed digits for floating-point numbers in the monitoring field

Example: value: 12.345; number of displayed digits: 3; display: 12.3

String length

Maximum length of string variable values in the monitoring field