You specify options for the indents and for the Tab key in the COBOL text editor in the
Tools > Options > Text Editor >
Micro Focus
COBOL, and on the
Tabs page.
- Indenting
-
- None
- No indentation occurs when you press
Enter. In addition:
- End statements (as in IF, END... IF) are not inserted automatically.
- With
Smart edit mode disabled, the cursor moves to column 1 at the beginning of the new line.
- With
Smart edit mode enabled, the cursor moves to the new line at the start of the current area. The
Smart edit mode rules for indenting comments in the right-hand area apply.
- Block
-
- With
Smart edit mode disabled, pressing
Enter indents the text and positions the cursor on the new line in the same column where the preceding line starts. When you press
Enter in the right-hand area, this moves the cursor to the new line in the same column where the preceding line starts - either
in the A/B area or in the right-hand area.
- With
Smart edit mode enabled, pressing
Enter indents the text and positions the cursor on the column matching the indent of the preceding line within the same code area.
The
Smart edit mode rules for indenting comments in the right-hand area apply.
With
Block indenting selected, pressing
Enter after an XML documentation comment (which starts with
*>>comment) positions the cursor on the new line in the same column where the previous line starts, and starts the line with the tag
for an XML documentation comment.
- Smart
- The default option.
With
Smart indenting selected, the IDE attempts to determine the correct indentation for the specific area of code and code construct.
Only applies to imperative code (code in the procedure division or in a method) in the A/B area. Indenting in other areas
of the program or in other COBOL areas in the editor behaves as when
Block is enabled.
With
Smart indenting selected, pressing
Enter after an XML documentation comment (which starts with
*>>comment) positions the cursor on the new line in the same column where the previous line starts, and starts the line with the tag
for an XML documentation comment.
- Tab
-
- Tab and indent size
- Defines the number of spaces inserted when you press
Tab or
Enter. When programming in COBOL, the Compiler expects the meaningful code to start from column eight. This is why it is convenient
to have the tab character replaced by four spaces to reduce the risk of introducing compilation errors in the code.
- Insert spaces
- Replaces the tab character with the number of spaces specified in the
Tab and indent size field.
- Keep tabs
- Inserts a tab character when you press
Tab.