Indentation Properties

The Indentation Engine determines the formatting of text that is generated or typed in the Source Editor.

To select or configure the Indentation Engine:

  1. Choose Tools Options, expand the Editor Settings node in the Options window, and select the type of Editor for which you want to set the indentation engine.
  2. Click the Indentation Engine property. Choose an indentation engine (or choose No Indentation) from the pulldown menu, or click the ellipsis (...) button to display the Indentation Engine Property Editor.

    Use the Indentation Engine Property Editor to view and modify the settings for one of the indentation engines. The Simple Indentation Editor has properties for handling tabs. The Java Indentation Editor has the tab properties, plus additional properties to handle Java code, as follows:

    Add Leading Star in Comment If True, automatically puts an asterisk (*) at the start of any line inside a block comment.
    Add Newline Before Brace If True, automatically puts curly braces on the following line in generated code.
    Add Space Before Parentheses If True, adds a space before the opening parenthesis in generated code.
    Expand Tabs to Spaces If True, inserts spaces (instead of the tab character) when the Tab key is typed. The number of spaces inserted is set in the Number of Spaces per Tab property.

    If False, moves the insertion point by the Number of Spaces per Tab property when the Tab key is typed, but inserts the tab character (\t) into the file if possible, replaces preceding spaces with the tab character if possible, or both. The Source Editor calculates where to place tab characters based on the value of the Tab Size property. (The Tab Size property is found in the main properties of the Source Editor, not in the Indentation Engine settings.)

    If Expand Tabs to Spaces is False and the Number of Spaces per Tab is different than the Tab Size property, the indentation created by typing the Tab key is made up of a combination of spaces and tab characters. It is easiest to predict the location of tab characters if you set Number of Spaces per Tab to an even multiple or divisor of Tab Size.

    Number of Spaces per Tab Sets the number of spaces indented when you press the Tab key.

    If the previous line is indented, the first press of the Tab key on a new line positions the insertion point to the indentation of the previous line, regardless of the Number of Spaces per Tab setting.

Note If the previous non-blank line is indented, the first press of the Tab key on a new line positions the insertion point to the previous indentation, regardless of the Number of Spaces per Tab setting.
See also
Source Editor Properties
Working With Tabs

Legal Notices