home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


3.5 Review of vi Motion Commands

Table 3.1 summarizes the commands covered in this chapter.


Table 3.1: Movement Commands
Movement Command

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.

f x

Move to previous occurrence of x in current line.

F x

Move to just before next occurrence of x in current line.

t x

Move to just after previous occurrence of x in current line.

T x

Repeat previous find command in same direction.

;

Repeat previous find command in opposite direction.

,

Go to given line n .

n G

Go to end of file.

G

Return to previous mark or context.

``

Return to beginning of line containing previous mark.

''

Show current line (not a movement command).

^G


Previous: 3.4 Movement by Line Number Learning the vi Editor Next: 4. Beyond the Basics
3.4 Movement by Line Number Book Index 4. Beyond the Basics

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System