Skip to main content

Working in the ST Editor

The ST editor is the central working environment in CODESYS 4 for writing and editing source code. It provides a familiar, convenient editing environment and is extended with IECĀ 61131-3 specific language functions. Its key functions include the following:

. Code editing and navigation
  • Autocomplete: Automatic code completion, suggestions, member lists, and parameter information

  • Validation: Direct display of syntax errors and warnings while typing

  • Go to definition: Quick jump to the definition of functions or variables

  • Multi-cursor: Simultaneous editing in multiple locations

  • Shortcuts: Full set of keyboard shortcuts

    For more information about the shortcuts of the editor, see the following: Generic text editor

  • Search and Replace: Hit highlighting, search history, and regular expression support

. Display and customization
  • Syntax highlighting: Color highlighting of language elements such as keywords, operators, identifiers, comments, and literals

  • Theming: Support for predefined themes (light, dark)

  • Code folding: Collapsible code blocks (such as functions or loops) for a better overview. Fixed scroll bar (sticky scroll) for orientation in nested blocks

  • Minimap: A visual overview of all code on the right side of the screen for quick navigation

  • Text indentation: Configurable indentation (spaces, tabs) with auto-detection

  • Customization: Comprehensive customization capability in the settings of the Preferences editor

    For more information about the settings of the editor, see the following: Preferences