Next: Tab Stops, Up: Indentation
Apart from the <TAB> (indent-for-tab-command) command,
Emacs provides a variety of commands to perform indentation in other
ways.
newline-and-indent).
split-line). The text on the
line after point becomes a new line, indented to the same column where
point is located. This command first moves point forward over any
spaces and tabs. Afterward, point is positioned before the inserted
newline.
back-to-indentation). If there are no
non-whitespace characters on the line, move to the end of the line.
tab-to-tab-stop). See Tab Stops.
tab-to-tab-stop instead—unless called with a numeric
argument, in which case do nothing.
delete-indentation).
This “joins” the two lines cleanly, by replacing any indentation at
the front of the current line, together with the line boundary, with a
single space.
As a special case (useful for Lisp code), the single space is omitted if the characters to be joined are consecutive opening and closing parentheses, or if the junction follows another newline.
If there is a fill prefix, M-^ deletes the fill prefix if it
appears after the newline that is deleted. See Fill Prefix.
indent-region).
If a numeric argument is supplied, indent every line in the region to
that column number.
indent-rigidly). The distance to move is determined by
the numeric argument (positive to move rightward, negative to move
leftward).
This command can be used to remove all indentation from the lines in the region, by invoking it with a large negative argument, e.g., C-u -1000 C-x <TAB>.