3.5. Review of vi Motion Commands

Table 3.1 summarizes the commands covered in this chapter.

Table 3.1. Movement Commands
MovementCommand
Scroll forward one screen.^F
Scroll backward one screen.^B
Scroll forward half screen.^D
Scroll backward half screen.^U
Scroll forward one line.^E
Scroll backward one line.^Y
Move current line to top of screen and scroll.z RETURN
Move current line to center of screen and scroll.z.
Move current line to bottom of screen and scroll.z-
Redraw the screen.^L
Move to home—top line of screen.H
Move to middle line of screen.M
Move to bottom line of screen.L
Move to first character of next line.RETURN
Move to first character of next line.+
Move to first character of previous line.-
Move to first non-blank character of current line.^
Move to column n of current line.n|
Move to end of word.e
Move to end of word (ignore punctuation).E
Move to beginning of current sentence.(
Move to beginning of next sentence.)
Move to beginning of current paragraph.{
Move to beginning of next paragraph.}
Move to beginning of current section.[[
Move to beginning of next section.]]
Search forward for pattern./pattern
Search backward for pattern.?pattern
Repeat last search.n
Repeat last search in opposite direction.N
Repeat last search forward./
Repeat last search backward.?
Move to next occurrence of x in current line.fx
Move to previous occurrence of x in current line.Fx
Move to just before next occurrence of x in current line.tx
Move to just after previous occurrence of x in current line.Tx
Repeat previous ...

Get Learning the vi Editor, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.