next up previous contents
Next: Adding Text Up: The vi Editor Previous: Reading Files

Cursor Movements

  As with most screen oriented editors, changes are made based upon the current position of the cursor. So I guess we should start with commands that move the cursor.

h
Left one position,
Left one position,
j
Down one position (line),
Down one position,
k
Up one position (line),
Up one position,
l
Right one position,
Right one position,
w
Move the cursor to the beginning of the next word (treating punctuation as separate words),
W
Move the cursor to the beginning of the next word (ignoring punctuation),
b
Move backward one word (including punctuation),
B
Move backward one word (ignoring punctuation),
^ F
Move forward one screen (^ F means Control F),
^ D
Move forward one half screen,
^ B
Move backward one screen,
^ U
Move backward one half screen,
H
Goto top line of screen,
M
Goto middle line of screen,
L
Goto last line of screen,
nH
Goto n'th line from top,
nL
Goto n'th line from bottom,
0
Goto beginning of line,
$
Goto end of line,
e
Goto end of word (including punctuation),
E
Goto end of word (ignoring punctuation),
(
Goto beginning of previous sentence,
)
Goto beginning of next sentence,
{
Goto beginning of previous paragraph,
}
Goto beginning of next paragraph,
nG
Goto n'th line

And there are movements based upon searching.


next up previous contents
Next: Adding Text Up: The vi Editor Previous: Reading Files

Gordon Haverland
Sat Oct 9 13:50:48 MDT 1999