Programmers who use structured languages
usually require some form of automatic indent, so
that they don't have to continually re-type the sequences
of tabs and/or spaces needed to maintain lengthy running
indents. Version 5.0 of NEdit is the first release
of NEdit to offer "smart" indent, at least
experimentally, in addition to the traditional automatic
indent which simply lines up the cursor position with
the previous line.
Smart Indent
Smart Indent in this release must still
be considered somewhat experimental. Smart indent
macros are only available by default for C and C++,
and while these can easily be configured for different
default indentation distances, they may not conform
to everyone's exact C programming style. Smart indent
is programmed in terms of macros in the NEdit macro
language which can be entered in: . Hooks are provided for intervening
at the point that a newline is entered, either via
the user pressing the Enter key, or through
auto-wrapping; and for arbitrary type-in to act on
specific characters typed.
To type a newline character without
invoking smart-indent when operating in smart-indent
mode, hold the Ctrl key while pressing
the Return or Enter key.
Auto-Indent
With Indent set to Auto (the default),
NEdit keeps a running indent. When you press the Return
or Enter key, spaces and tabs are inserted
to line up the insert point under the start of the
previous line. Ctrl+Return in
auto-indent mode acts like a normal return, With auto-indent
turned off, Ctrl+Return does
indentation.
Block Indentation Adjustment
The and commands as well as rectangular dragging
can be used to adjust the indentation for several
lines at once. To shift a block of text one character
to the right, select the text, then choose from the Edit menu. Note that the accelerator
keys for these menu items are Ctrl+9 and
Ctrl+0, which correspond to the right and
left parenthesis on most keyboards. Remember them
as adjusting the text in the direction pointed to
by the parenthesis character. Holding the Shift
key while selecting either or will shift the text by one tab stop (or
by one emulated tab stop if tab emulation is turned
on). The help section: "Shift
Left, Shift Right" above has details.
|