Characters are too small a unit. Vim's word motions:
| Key | Moves to | |
|---|---|---|
w |
start of the next word | |
b |
start of the current/previous word | "back" |
e |
end of the word | |
W B E |
the same for WORDs | |
0 |
column 0 | |
^ |
first non-blank character | |
$ |
last character |
A word is a run of letters, digits and _, or a run of other
punctuation — so a->b is three words (a, ->, b). A WORD is
anything between whitespace, so a->b is one WORD. In C++, W/E are
great for skipping over std::vector<int> or obj->field.
_ or a run of punctuation, so obj->field is three words; a WORD is everything between spaces. Step through w presses.A is $a and I is ^i — the most common pairs get one key.