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 commandCtrl+U 10 Ctrl+Bmoves the cursor 10 characters backwards, but the commandCtrl+U -10 Ctrl+Bmoves the cursor 10 characters forward.
Some movement commands may behave slightly differently in different modes as delimiter characters may vary.
Forward CharacterEditor Command
- Arguments: None
Key sequence:Ctrl+F or Right Arrow on some keyboards - Moves the current point forward one character.
Backward CharacterEditor Command
- Arguments: None
Key sequence:Ctrl+B or Left Arrow on some keyboards - Moves the current point backward one character.
Forward WordEditor Command
- Arguments: None
Key sequence: +F - Moves the current point forward one word.
Backward WordEditor Command
- Arguments: None
Key sequence: +B - Moves the current point backward one word.
Beginning of LineEditor Command
- Arguments: None
Key sequence:Ctrl+A - Moves the current point to the beginning of the current line.
End of LineEditor Command
- Arguments: None
Key sequence:Ctrl+E - Moves the current point to the end of the current line.
Next LineEditor 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 LineEditor 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.
Forward SentenceEditor Command
- Arguments: None
Key sequence: +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 SentenceEditor Command
- Arguments: None
Key sequence: +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 ParagraphEditor Command
- Arguments: None
Key sequence: +] - 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 ParagraphEditor Command
- Arguments: None
Key sequence: +[ - 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 DownEditor 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 UpEditor Command
- Arguments: None
Key sequence: +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.
Scroll-OverlapEditor Variable
- Default value: 2
- Determines the number of lines of overlap when
Scroll Window Down andScroll Window Up are used with no prefix argument.
Line to Top of WindowEditor Command
- Arguments: None
Key sequence: None - Moves the current line to the top of the window.
Top of WindowEditor Command
- Arguments: None
Key sequence: None - Moves the current point to the start of the first line currently displayed in the window.
Bottom of WindowEditor Command
- Arguments: None
Key sequence: None - Moves the current point to the start of the last line that is currently displayed in the window.
Beginning of BufferEditor Command
- Arguments: None
Key sequence: +Shift+< - Moves the current point to the beginning of the current buffer.
End of BufferEditor Command
- Arguments: None
Key sequence: +Shift+> - Moves the current point to the end of the current buffer.
Skip WhitespaceEditor Command
- Arguments: None
Key sequence: None - Skips to the next non-whitespace character if the current character is a whitespace character (for example,
Space,Tab or newline).
What Cursor PositionEditor Command
- Arguments: None
Key sequence:Ctrl+X = - Displays in the echo area the character under the point and the column of the point. Also available via the function:
editor:what-cursor-position-command.
Where Is PointEditor Command
- Arguments: None
Key sequence: None - Displays in the echo area the position of the current point in terms of characters in the buffer, as a fraction of current point position over total buffer length.
Goto PointEditor Command
- Arguments: point
Key sequence: None - Moves the current point to point, where point is a character position in the current buffer.