Book HomeBook TitleSearch this book

8.2. Movement Commands

A number preceding a command repeats the movement. Movement commands are also objects for change, delete, and yank operations.

8.2.1. Character

h, j, k, lLeft, down, up, right (Figure , Figure , Figure , Figure ).
SpacebarRight.

8.2.2. Text

w, W, b, BForward, backward by word.
e, EEnd of word.
), (Beginning of next, current sentence.
}, {Beginning of next, current paragraph.
]], [[Beginning of next, current section.

8.2.3. Lines

0, $First, last position of current line.
^First nonblank character of current line.
+, -First character of next, previous line.
ReturnFirst character of next line.
n|Column n of current line.
HTop line of screen.
MMiddle line of screen.
LLast line of screen.
nHn lines after top line.
nLn lines before last line.

8.2.4. Screens

CTRL-F

CTRL-B

Scroll forward, backward one screen.

CTRL-D

CTRL-U

Scroll down, up one-half screen.

CTRL-E

CTRL-Y

Show one more line at bottom, top of window.
z ReturnReposition line with cursor to top of screen.
z.Reposition line with cursor to middle of screen.
z-Reposition line with cursor to bottom of screen.
CTRL-L

CTRL-R

Redraw screen (without scrolling).

8.2.5. Searches

/textSearch forward for text.
nRepeat previous search.
NRepeat search in opposite direction.
/Repeat forward search.
?Repeat previous search backward.
?textSearch backward for text.
/text/+nGo to line n after text.
?text?-nGo to line n before text.
%Find match of current parenthesis, brace, or bracket.
fxMove search forward to x on current line.
FxMove search backward to x on current line.
txSearch forward to character before x in current line.
TxSearch backward to character after x in current line.
,Reverse search direction of last f, F, t, or T.
;Repeat last character search (f, F, t, or T).

8.2.6. Line Numbering

CTRL-GDisplay current line number.
nGMove to line number n.
GMove to last line in file.
:nMove to line number n.

8.2.7. Marking Position

mxMark current position with character x.
xMove cursor to mark x.
'xMove to start of line containing x.
‘‘Return to previous mark (or to location prior to a search).
''Like above, but return to start of line.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.