Moving With Words

It is useful to navigate by word to travel medium distances, since all statements in a program are composed of words.

w
-move to the next word
Example
e
-move to the end of a word
Example
b
-move back a word
Example







function setGreeting(greeting: string) {
const element = document.getElementById('greeting');
element.innerText = greeting;
}
setGreeting('Hello World!');
 0/15  00:00

What defines a word?

In Vim, a word consists of a sequence of letters, digits and underscores, or a sequence of other non-blank characters, separated with white space. (Source: Vim Help Page)

There is no need to memorize this definition. It is easier to practice moving with words in the playground above until you get a good feel for it.