Setting Tabs and Indents
Home Page (Text Editor) | Overview | How Do I ... Topics | FAQ | Reference
You can indent text with tab characters several ways:
Use the INDENT SELECTION key.
Use Auto Indent (without Smart Indent).
Use Auto Indent (with Smart Indent enabled).
When you press the TAB key, the insertion point moves to the next indent level. You can display (or hide) the tab symbols by selecting Advanced from the Edit menu, and then selecting View Whitespace.
You can also use Auto Indent (without Smart Indent) to automatically indent new lines to match the previous line.
What do you want to do?
Set Auto Indent
Set Smart Indent
Change tab and indent settings
Display or hide tab symbols
Indent a group of lines
Unindent a group of lines
To set Auto Indent
From the Tools menu, choose Options.
Select the Tabs tab.
Under Auto indent, select the option you want:
None: to disable Auto Indent
Default: to set the tab and indent size to match that of the previous level
Smart: to use Smart Indent
Click OK.
If you use Auto Indent (with Smart Indent enabled), the Text editor automatically indents the text based on the context of the previous lines.
To set Smart Indent
From the Tools menu, choose Options.
Select the Tabs tab.
Under Auto Indent, select Smart.
Under Smart indent options, select the language element and specify the number of previous lines to use for the context of smart indenting.
Click OK.
Backspacing over a tab character deletes that tab character, regardless of the indent setting.
If you select the Insert spaces option, a tab character is not inserted, and only spaces are inserted to reach the next indent level.
Note The File type box on the Tabs tab contains a list of file types. The initial tab settings for each file you load are assigned based on the file extension and the setting of this box. You can use the Tab size and Indent size boxes on the Tabs tab or on the Source File Properties page to specify individual settings for these two fields on a per-file basis, as needed.
To change tab and indent settings
From the Tools menu, choose Options.
Select the Tabs tab.
In the Tab size box, type the number of spaces to use as a tab stop. The default is four spaces.
In the Indent size box, type the number of spaces to use for indents. The default is four spaces.
Select the Keep tabs option to treat each tab as a single tab character when the file is saved.
–or–
Select the Insert spaces option to use spaces as specified in the Tab size box.
Click OK.
To display or hide tab symbols
From the Edit menu, choose Advanced.
Select View Whitespace.
Spaces are displayed as dots and tab symbols are displayed as
>>
whenever they appear in a source file.
To indent a group of lines
Select the group of lines.
Press the LineIndentkey combination.
To unindent a group of lines
Select the group of lines.
Press the LineUnindentkey combination.
Note The LineUnindent command only returns to previous tab stops.