Editor icon

Functions of type eEditorFunction work on a whole file through the Scintilla editor control. The control is an OCX and must be visible to work, so the editor view is shown automatically during a run that includes one of these functions. For the same reason they are slower than the line-by-line types: the source code is passed through the editor control instead of being processed in memory.


EditorNormalizeCase

Changes the case of all scopes and keywords to the case defined in the language settings.

Example: procedure OnClick -> Procedure OnClick, and if (iRec <> 0) begin -> If (iRec <> 0) Begin

The case that each word is changed to is a setting. The spelling of every keyword and operator is set in the Editor Settings dialog, under Keywords and Operators, so the result follows the style you set there.

The function uses the editor control, so the program's Editor view is shown while it runs.

Group: Tidy Up


EditorReIndent

Indents the source code again, with the number of spaces set in the function's parameter.

Example: a file mixing 3-space, 8-space and flush-left lines is re-indented to the size you pick.

The indentation of every line is calculated from the block structure, so a file that mixes indentation styles, or whose indentation has become inconsistent over the years, gets one consistent indentation.

The tab size is the same setting as the tab size in the Editor Settings dialog; the two settings are linked.

The function uses the editor control, so the program's Editor view is shown while it runs.

Group: Tidy Up

Parameter: 1, 2, 3, 4, 5, 6, 7, 8

Default: 4

Select the indent size you want to use for spaces when indenting code and when breaking a line on rewriting a single line to multiple lines.

It is the same value that can be set on the Editor Settings dialog tab size.