Cursor Movement Commands
In addition to the key bindings shown in this table, you can use the arrow keys to move around in Emacs. When you run Emacs in a graphical display environment (e.g., in the X Window System), you can also use the mouse for operations such as moving the cursor or selecting text.
|
Binding |
Command |
Action |
|
C-f |
forward-char |
Move forward one character (right). |
|
C-b |
backward-char |
Move backward one character (left). |
|
C-p |
previous-line |
Move to previous line (up). |
|
C-n |
next-line |
Move to next line (down). |
|
M-f |
forward-word |
Move one word forward. |
|
M-b |
backward-word |
Move one word backward. |
|
C-a |
beginning-of-line |
Move to beginning of line. |
|
C-e |
end-of-line |
Move to end-of-line. |
|
M-a |
backward-sentence |
Move backward one sentence. |
|
M-e |
forward-sentence |
Move forward one sentence. |
|
M-{ |
backward-paragraph |
Move backward one paragraph. |
|
M-} |
forward-paragraph |
Move forward one paragraph. |
|
C-v |
scroll-up |
Move forward one screen. |
|
M-v |
scroll-down |
Move backward one screen. |
|
C-x [ |
backward-page |
Move backward one page. |
|
C-x ] |
forward-page |
Move forward one page. |
|
M-> |
end-of-buffer |
Move to end-of-file. |
|
M-< |
beginning-of-buffer |
Move to beginning of file. |
|
(none) |
goto-line |
Go to specific line of file. |
|
(none) |
goto-char |
Go to specific character of file. |
|
C-l |
recenter |
Redraw screen with current line in the center. |
|
M-n |
digit-argument |
Repeat the next command n times. |
|
C-u n |
universal-argument |
Repeat the next command n times. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access