4.4.1.2. Moving around
You can move the cursor around using the arrow keys. If your arrow keys don't work (which may be the case if you're using a remote connection from a bad terminal program), you can use the h, j, k, and l keys, as shown in Table 4-7 .
Table 4-7. Basic vi movement commands
Command | Description |
---|---|
Left, h, or Backspace | Move left one character. |
Down or j | Move down one line. |
Up or k | Move up one line. |
Right, l, or Space | Move right one character. |
Enter | Move to the start of the next line. |
Home, ^, |, or 0 (Zero) | Move to the start of the line. |
End, $ | Move to the end of the line. |
:number Enter | Move to line number. |
:0 Enter | Move to the start of the file. |
:$ | Move to the end of the file. |
w | Move forward one word. |
You can put a number in front of any command to repeat the command. For example, typing 10j will move down 10 lines.