Next: Language Modes, Previous: Comment Manipulation, Up: Editing Programs [Contents][Index]
Nearly all programming languages have conventions for indentation or leading whitespace at the beginning of lines. The Hemlock indentation facility is integrated into the command set so that it interacts well with other features such as filling and commenting.
This command indents the current line. With a prefix argument, indents that many lines and moves down. Exactly what constitutes indentation depends on the current mode (see Indent Function).
This command starts a new indented line. Deletes any whitespace before the point and inserts indentation on a blank line. The effect of this is similar to Return followed by Tab. The prefix argument is passed to New Line, which is used to insert the blank line.
This command indents every line in the region. It may be undone with Undo.
This command moves point to the first non-whitespace character on the current line.
Delete Indentation joins the current line with the previous one, deleting excess whitespace. This operation is the inverse of the Linefeed command in most modes. Usually this leaves one space between the two joined lines, but there are several exceptions.
The non-whitespace immediately surrounding the deleted line break determine the amount of space inserted.
When given a prefix argument, this command joins the current and next lines, rather than the previous and current lines.
This command inserts a tab character.
This command changes the indentation of all the lines in the region. Each line is moved to the right by the number of spaces specified by the prefix argument, which defaults to eight. A negative prefix argument moves lines left.
This indents the current line so that it is centered between the left margin and Fill Column. If a prefix argument is supplied, then it is used as the width instead of Fill Column.
The value of this variable determines how indentation is done, and it is a function which is passed a mark as its argument. The function should indent the line which the mark points to. The function may move the mark around on the line. The mark will be :left-inserting. The default simply inserts a tab character at the mark.
Indent with Tabs holds a function that takes a mark and a number of spaces. The function will insert a maximum number of tabs and a minimum number of spaces at mark to move the specified number of columns. The default definition uses Spaces per Tab to determine the size of a tab. Note, Spaces per Tab is not used everywhere in Hemlock yet, so changing this variable could have unexpected results.
Next: Language Modes, Previous: Comment Manipulation, Up: Editing Programs [Contents][Index]