Let's say we have the following in vim atm:
int main () {
printf("hello");
return 0;
}
In vim, w moves a word to the right, but what exactly constitutes a 'word'?
For example, if I have the cursor on p of printf
, pressing w takes u to (
and pressing another w skips the "
and puts the cursor on the h
of hello
. Why was the "
skipped ?
Pressing another w now takes you to the other "
before the )
and pressing another w
takes you to the next line. Why where the )
and ;
skipped?
And now the cursor is on the r
of return
. Pressing a w takes the cursor on 0
and pressing another w now takes the cursor on the ;
. So in this case, the ;
was not skipped unlike in the previous line. Why is this?
I hope I made my question clear enough but I'm just trying to understand how this all works.