Table 18-1. Commands for Moving Around in a File
Key | What It Does |
---|
j | Moves cursor down one line. |
k | Moves cursor up one line. |
l | Moves cursor one character to the right. |
h | Moves cursor one character to the left. |
G | Moves cursor to the last line of the file. |
L | Moves cursor to the last line on the screen. |
Ctrl-d | Moves down one screen. |
Ctrl-u | Moves up one screen. |
:n | Moves the cursor to line n. For instance, :1 moves to the first line of the file. |
$ | Moves to the end of the current line. |
^ | Moves to the first non-space character in the current line. |
0 (zero) | Moves to the beginning of the line. |
w | Moves to the beginning of the next word. |
b | Moves to the beginning of the previous word. |
e | Moves to the end of the word. |