I googled and that\'s what it says:
To go back a word, b is used. Once again, B will include more characters in what Vim considers a word.
I didn\'t underst
Like most of the capitalized movement pairs, b moves by word, but B moves by WORD. The difference is that vim considers a "word" to be letters, numbers, and underscores (and you can configure this with the iskeyword
setting), but a "WORD" is always anything that isn't whitespace.
So given this:
foo-bar-baz
If your cursor is on the z
and you press b, the cursor will move back to the start of baz
, then to the hyphen, then back to the start of bar
, and so on. Each of these is a different "word" to vim: foo
, -
, bar
, -
, baz
.
But if you press B, the cursor will move all the way left to the f
, because foo-bar-baz
is all non-whitespace and thus a single WORD.
:help word
inside vim explains this too.
Regarding the vim game: I think the game treats boulders as punctuation. Try typing it in vim like this:
not WORDS*!
With the cursor on !
, b will move you back to the *
, because *!
is all punctuation and thus one word. But that *
is actually a boulder, so you can't move there, so nothing happens. B, on the other hand, will skip you back over everything that isn't a space.
B treats punctuation as part of the word, using only whitespace as word delimiters; b does not treat punctuation as part of the word.