The ST editor is a textual editor used for the implementation of code in Structured Text (ST) and Extended Structured Text (ExST).
The line numbering is displayed on the left side of the editor. When inputing programming elements, the "List components" functionality (activated in the CODESYS options, “SmartCoding” category) and the Input Assistant [F2] are also useful. When the cursor is placed over a variable, CODESYS shows a tooltip with information for declaring variables.
The box selection can be made with the following key combinations:
-
[Shift]+[Alt]+[Arrow Right]: The selected area is extended one position to the right.
-
[Shift]+[Alt]+[Arrow Left]: The selected area is extended one position to the left.
-
[Shift]+[Alt]+[Arrow Up]: The selected area is extended one position up.
-
[Shift]+[Alt]+[Arrow Down]: The selected area is extended one position down.
The behavior (for example parentheses, mouse actions, tabs) and appearance of the editor are configured in the CODESYS options in the “Text Editor” category.
For an incremental search for strings in the editor, open an input field at the bottom edge of the editor by means of the key combination [Ctrl]+[Shift]+[i]. As soon as you start typing in characters, the corresponding search locations are highlighted in color in the editor. The number of found matches is shown to the right of the input field. You can set the cursor at the search location by using the arrow keys or the key combinations [Alt]+[Page Up] or [Alt]+[Page Down].
When you place the cursor on a symbol name, all occurrence locations of the symbol within the editor are highlighted in color. The search locations correspond to the hits in the cross-reference list. For very large projects, this can cause input delays. In this case, you can disable the function in the options of the text editor.
CODESYS identifies syntax errors already when inputing in the editor and shows the corresponding messages in the message view (“Precompile” category). If the corresponding option is selected in the CODESYS options (“SmartCoding” category), then the error locations in the text are also underlined with a wavy red line.
The “Format Document” command provides an automatic formatting of syntactically correct ST code.