Skip to main content

Dialog: Options: Auto Formatter

Debug mode

This functionality is available only when your CODESYS instance is started in debug mode.

To do this, start your instance with the following command line call:

codesys.exe --debug

Symbol: san_icon_auto_formatter.png

Function: The automatic formatting of the IEC code is configured in this dialog.

Call: Tools → Options menu, Auto Formatter category

Auto Formatter

General

Declaration and implementation

Squash empty lines

  • true (default): Blank lines are removed.

  • false: Blank lines are retained.

Interface

Declaration

Align variable types

  • true (default):

    All types in a variable block are arranged so that they start with the same line depth.

    _san_formatter_example_align_types_true.png
  • false:

    _san_formatter_example_align_types_false.png

Align variable initializations

  • true (default):

    All initializations in a variable block are arranged so that they start with the same line depth.

    _san_formatter_example_align_initialization_true.png
  • false:

    _san_formatter_example_align_initialization_false.png

Align variable trailing comments

  • true (default):

    All comments which are located in the same line as the variable declaration start at the same line depth.

    _san_formatter_example_align_comments_true.png
  • false:

    _san_formatter_example_align_comments_false.png

Invocations

All calls are formatted when the maximum values are exceeded. 

Example:

_san_formatter_example_align_calls.png

Max. number of parameters before line break

The number of parameters which a single-line call can contain is limited.

Example: 4 (default)

Max. char length of parameters before line break

The number of characters in the parameter name is limited.

Example: 300 (default)