6.1.8. Smart Enter KeyΒΆ

The Smart Enter key will automatically format the code of the current line if the “Coding style mode” preference is set to “extended” in the Coding Style preferences page. The effect is as if manually applying the Format command to the line.

See Formatting Source Code for the details of the formatting applied.

In this initial figure, assume the “Coding style mode” is set to “extended”. Also assume that reserved words are to be in lower-case, identifiers are to be Smart_CASED, and that the default indentation is 3. The cursor is at the end of the line:

smart enter key before invocation

When we press the Enter key, the line is automatically formatted and the cursor is automatically indented to the appropriate location for the sequence of statements within the if-statement:

smart enter key after invocation

Note that, after the line is formatted, the identifier appears as “Rt” even though it appears as “RT” elsewhere. Since the identifier was “rt” before formatting and the casing policy was “Smart_CASED”, it becomes “Rt” after formatting.