The editor uses the Tab key to increase or decrease the indentation
level. The indentation size can be changed in the Language Properties pane of the
editor's Properties window, as can all the indent-related features listed below.
To change the indentation size:
- Set the Indent Size property for the required language.
The editor can optionally use tab characters to fill whitespace when indenting.
The use of tabs for filling whitespace can be selected in the editor's Language settings.
To select tab or space fill when indenting:
- Set the Use Tabs property for the required language. Note: changing
this setting does not add or remove existing tabs from files, the change will
only affect new indents.
The editor can assist with source code indentation while inserting
text. There are three levels of indentation assistance:
-
None: The indentation of the source code is left to the user.
-
Indent: This is the default. The editor maintains the current
indentation level. When you press Return or Enter, the editor
moves the insertion point down one line and indented to the same level
as the now-previous line.
-
Smart: The editor analyzes the source code to compute the
appropriate indentation level for each line. You can change how many lines before the
cursor position will be analyzed for context. The
smart-indent mode can be configured to indent either open and closing braces
or the lines following the braces.
Changing indentation options:
To change the indentation mode:
- Set the Indent Mode property for the required language.
To change whether opening braces are indented in smart-indent mode:
- Set the Indent Opening Brace property for the required language.
To change whether closing braces are indented in smart-indent mode:
- Set the Indent Closing Brace property for the required language.
To change the number of previous lines used for context in smart-indent mode:
- Set the Indent Context Lines property for the required language.