Inserting Text Basic Erasing
To do more than insert characters, you have to know how to move point (see Point). The simplest way to do this is with arrow keys, or by clicking the left mouse button where you want to move to.
There are also control and meta characters for cursor motion. Some are equivalent to the arrow keys (these date back to the days before terminals had arrow keys, and are usable on terminals which don't have them). Others do more sophisticated things.
Move to the beginning of the line (
|C-e||Move to the end of the line (|
|C-f||Move forward one character (|
|C-b||Move backward one character (|
|M-f||Move forward one word (|
|M-b||Move backward one word (|
|C-n||Move down one line, vertically (|
|C-p||Move up one line, vertically (|
|M-r||Move point to left margin, vertically centered in the window
A numeric argument says which screen line to place point on. It counts screen lines down from the top of the window (zero for the top line). A negative argument counts lines from the bottom (1 for the bottom line).
|M-<||Move to the top of the buffer (|
|M->||Move to the end of the buffer (|
|M-x goto-char||Read a number n and move point to buffer position n. Position 1 is the beginning of the buffer.|
|M-x goto-line||Read a number n and move point to line number n. Line 1 is the beginning of the buffer.|
|C-x C-n||Use the current column of point as the semipermanent goal column for
C-n and C-p (|
|C-u C-x C-n||Cancel the goal column. Henceforth, C-n and C-p once again try to stick to a fixed horizontal position, as usual.|
If you set the variable
track-eol to a non-
then C-n and C-p when at the end of the starting line move
to the end of another line. Normally,
See Variables, for how to set variables such as
Normally, C-n on the last line of a buffer appends a newline to
it. If the variable
C-n gets an error instead (like C-p on the first line).