Moving the cursor on the line
- Command
- Moves the cursor:
- ^ or 0
- To the beginning of the current line (to the first nonblank space). The command 0 is short for 0|, which moves the cursor to column number 0.
- $
- To the end of the current line
Go to the beginning of a line, and press w. The cursor jumps forward to the beginning of the next word on the line. w stands for word and it moves the cursor forward one word. If you keep pressing w, the cursor keeps jumping forward. When you jump forward from the last word in the line, you go to the first word in the next line. If you precede w with a number (as in 5w), the cursor jumps forward that many words.
Typing b is like typing w, except that you go back a word instead of forward. If you go back from the first word on a line, you get to the last word on the previous line. If you precede b with a number (as in 3b), the cursor jumps backward that many words.
If the cursor is in the middle of a word, typing e moves the cursor to the end of the word. For example, if the cursor is in the middle of the word slithy, typing e moves the cursor to the last letter in the word. If the cursor is already on the last letter of a word, typing e moves the cursor to the end of the next word.
- Command
- Moves the cursor:
- e
- To the end of the current word
- w
- To the beginning of the next word
- b
- To the beginning of the previous word
- Command
- Moves the cursor:
- E
- To the end of the current word
- W
- To the beginning of the next word
- B
- To the beginning of the previous word