3.6 Movement

This section gives details of commands used to move the current point (indicated by the cursor) around the buffer.

The use of prefix arguments with this set of commands can be very useful, as they allow you to get where you want to go faster. In general, using a negative prefix argument repeats these commands a certain number of times in the opposite logical direction. For example, the command
Ctrl+U 10 Ctrl+B
moves the cursor 10 characters backwards, but the command
Ctrl+U -10 Ctrl+B
moves the cursor 10 characters
forward
.

Some movement commands may behave slightly differently in different modes as delimiter characters may vary.

Forward Character

Editor Command

Arguments: None
Key sequence:
Ctrl+F
or Right Arrow on some keyboards

Moves the current point forward one character.

Backward Character

Editor Command

Arguments: None
Key sequence:
Ctrl+B
or Left Arrow on some keyboards

Moves the current point backward one character.

Forward Word

Editor Command

Arguments: None
Key sequence:
Meta+F

Moves the current point forward one word.

Backward Word

Editor Command

Arguments: None
Key sequence:
Meta+B

Moves the current point backward one word.

Beginning of Line

Editor Command

Arguments: None
Key sequence:
Ctrl+A

Moves the current point to the beginning of the current line.

End of Line

Editor Command

Arguments: None
Key sequence:
Ctrl+E

Moves the current point to the end of the current line.

Next Line

Editor Command

Arguments: None
Key sequence:
Ctrl+N
or Down Arrow on some keyboards

Moves the current point down one line. If that would be after the end of the line, the current point is moved to the end of the line instead.

Previous Line

Editor Command

Arguments: None
Key sequence:
Ctrl+P
or Up Arrow on some keyboards

Moves the current point up one line. If that would be after the end of the line, the current point is moved to the end of the line instead.

Goto Line

Editor Command

Arguments:
number
Key sequence: None

Moves to the line numbered
number
.

What Line

Editor Command

Arguments: None.
Key sequence: None

Prints in the Echo Area the line number of the current point.

Forward Sentence

Editor Command

Arguments: None
Key sequence:
Meta+E

Moves the current point to the end of the current sentence. If the current point is already at the end of a sentence, it is moved to the end of the next sentence.

Backward Sentence

Editor Command

Arguments: None
Key sequence:
Meta+A

Moves the current point to the start of the current sentence. If the current point is already at the start of a sentence, it is moved to the beginning of the previous sentence.

Forward Paragraph

Editor Command

Arguments: None
Key sequence:
Meta+]

Moves the current point to the end of the current paragraph. If the current point is already at the end of a paragraph, then it is moved to the end of the next paragraph.

Backward Paragraph

Editor Command

Arguments: None
Key sequence:
Meta+[

Moves the current point to the start of the current paragraph. If the current point is already at the start of a paragraph, then it is moved to the beginning of the previous paragraph.

Scroll Window Down

Editor Command

Arguments: None
Key sequence:
Ctrl+V

editor:scroll-window-down-command
p
&optional
window

Changes the text that is being displayed to be one screenful forward, minus Scroll-Overlap. If the current point is no longer included in the new text, it is moved to the start of the line nearest to the centre of the window.

A prefix argument causes the current screen to be scrolled up the number of lines specified and that number of new lines are shown at the bottom of the window.

Window
is the name of the window to be scrolled. The default is the current window.

Scroll Window Up

Editor Command

Arguments: None
Key sequence:
Meta+V

editor:scroll-window-up-command
p
&optional
window

Changes the text that is being displayed to be one screenful back, minus Scroll-Overlap. If the current point is no longer included in the new text, it is moved to the start of the line nearest to the centre of the window.

A prefix argument causes the current screen to be scrolled down the number of lines specified and that number of new lines are shown at the top of the window.

The argument
window
is the name of the window to be scrolled. The default is the current window.