A number preceding a command repeats the movement. Movement commands are also objects for change, delete, and yank operations.
h, j, k, l | Left, down, up, right (, , , ). |
Spacebar | Right. |
w, W, b, B | Forward, backward by word. |
e, E | End of word. |
), ( | Beginning of next, current sentence. |
}, { | Beginning of next, current paragraph. |
]], [[ | Beginning of next, current section. |
0, $ | First, last position of current line. |
^ | First nonblank character of current line. |
+, - | First character of next, previous line. |
Return | First character of next line. |
n| | Column n of current line. |
H | Top line of screen. |
M | Middle line of screen. |
L | Last line of screen. |
nH | n lines after top line. |
nL | n lines before last line. |
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 Return | Reposition 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). |
/text | Search forward for text. |
n | Repeat previous search. |
N | Repeat search in opposite direction. |
/ | Repeat forward search. |
? | Repeat previous search backward. |
?text | Search backward for text. |
/text/+n | Go to line n after text. |
?text?-n | Go to line n before text. |
% | Find match of current parenthesis, brace, or bracket. |
fx | Move search forward to x on current line. |
Fx | Move search backward to x on current line. |
tx | Search forward to character before x in current line. |
Tx | Search 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). |
CTRL-G | Display current line number. |
nG | Move to line number n. |
G | Move to last line in file. |
:n | Move to line number n. |
mx | Mark current position with character x. |
‘x | Move cursor to mark x. |
'x | Move 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. |
Copyright © 2003 O'Reilly & Associates. All rights reserved.