6.12.3 The Editor

Several aspects of the editor window behaviour can be set in this dialog. The editor preferences dialog is shown in figure (6.35). Note that some of these options affect only newly opened windows, not already opened windows (e.g. Vertical Blocks, Highlight Column/Row).

Figure 6.35: The editor preferences dialog


The following elements can be set in the editor preferences dialog:

Create backup files
Whenever an editor file is saved, a backup is made of the old file. On by default.
Insert mode
Start with insert mode.
Auto indent mode
Smart indenting is on. This means that pressing Enter will position the cursor on the next line in the same column where text starts on the current line. On by default.
Use tab characters
When the tab key is pressed, use a tab character. Normally, when the tab key is pressed, spaces are inserted. When this option is checked, tab characters will be inserted instead. Off by default.
Backspace unindents
Pressing the Bksp key will unindent if the beginning of the text on the current line is reached, instead of deleting just the previous character. On by default.
Persistent blocks
When a selection is made, and the cursor is moved, the selection is not destroyed, i.e. the selected block stays selected. On by default.
Syntax highlight
Use syntax highlighting on the files that have an extension which appears in the list of highlight extensions. On by default.
Block insert cursor
The insert cursor is a block instead of an underscore character. By default the overwrite cursor is a block. This option reverses that behaviour. Off by default.
Vertical blocks
When selecting blocks spanning several lines, the selection doesn’t contain the entirety of the lines within the block; instead, it contains the lines as far as the column on which the cursor is located. Off by default.
Highlight column
When checked, the current column (i.e. the column where the cursor is) is highlighted. Off by default.
Highlight row
When checked, the current row (i.e. the row where the cursor is) is highlighted. Off by default.
Auto closing brackets
When an opening bracket character is typed, the closing bracket is also inserted at once. Off by default.
Keep trailing spaces
When saving a file, the spaces at the end of lines are stripped off. This option disables that behaviour; i.e. any trailing spaces are also saved to file. Off by default.
Codecomplete enabled
Enable code completion. On by default.
Enable folds
Enable code folding. Off by default.
Tab size
The number of spaces that are inserted when the Tab key is pressed. The default value is 8.
Indent size
The number of spaces a block is indented when calling the block indent function. The default value is 2.
Highlight extensions
When syntax highlighting is on, the list of file masks entered here will be used to determine which files are highlighted. File masks should be separated with semicolon (;) characters. The default is *.pas;*.pp;*.inc.
File patterns needing tabs
Some files (such as makefiles) need actual tab characters instead of spaces. Here a series of file masks can be entered to indicate files for which tab characters will always be used. Default is make*;make*.*.

Remark: These options will not be applied to already opened windows; only newly opened windows will have these options.