Next: Color Syntax Highlighting, Previous: Internal Editor, Up: Internal Editor [Contents]

#### 7.4.1 Smart Indent

The internal editor supports automatic indentation for TAB, RETURN and BACKSPACE keys and braces. TAB and Shift+TAB works also with selections as in most programming editors. Selecting a block of text (or using Ctrl+A to select the entire file) and pressing TAB or Shift+TAB has the same effect as if applied to each line separately.

In addition Msc-generator detects the beginning of multi-line labels and attribute lists and can align all subsequent lines of the label or attribute list to the first.

The parameters of automatic indentation can be set on the `Indent` panel of the `Internal Editor` ribbon category. Checking the `Auto Smart Indent` check box makes the tool automatically indent after presing RETURN, BACKSPACE, opening or closing braces and square brackets. This way indentation is automatic as you type.

The `TAB auto-indents` checkbox governs what happens when you press the TAB key. If it is on, the whole line of the cursor (or the whole selection) is auto-indented. If it is off, simply a TAB character is inserted or the whole selection indednted uniformly by the TAB size, set below.

The amount of space added by smart indent can be set in the next four edits. `instructions` govern how much instructions inside braces are indented; `attributes` are used to indent attribute lists; `blocks` govern, how a subsequent block in a parallel block, box or pipe series is indented, while `inside` governs, how anything else inside an instruction is indented, such as options in an option list, entities in an entity list, etc.

Finally, the last two check-boxes govern, if special indentation for labels and attribute list are applied or not. See the below figure for explanation.

Next: Color Syntax Highlighting, Previous: Internal Editor, Up: Internal Editor [Contents]