Neovim Word Motions

We previously learned about text objects, and more specifically about Vim's definitions for words and words. In this section we will learn another way to move horizontally within a buffer, using motions than move the cursor across one or more words.

CommandAction
wcursor N words forward
Wcursor N WORDS forward
ecursor forward to the end of word N
Ecursor forward to the end of WORD N
bcursor N words backward
Bcursor N WORDS backward
gego backwards to the end of the previous word
gEgo backwards to the end of the previous WORD

Let's first look at how w behaves with the first line of text:

Initial Conditions
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:1
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:6
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:9
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:11
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:16
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:21
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:28
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:32
 
Move the cursor (again)
w
This·is·a·line·with·sample·text. 
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:1
 

Now, let's look at how W behaves with the same text:

Initial Conditions
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:1
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:6
 
Move the cursor (again)
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:9
 
Move the cursor (again)
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:11
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:16
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:21
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
Top
1:28
 
Move the cursor (again)
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:1
 

w and W behave almost the same for this text. The only difference is the way the trailing period is handled. w stops at the period in step 7, while W steps over the period and proceeds to the next line.

Now, lets look at w with the second line of text:

Initial Conditions
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:1
 
Move the cursor (again)
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:6
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:11
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:15
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:21
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:26
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:27
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:33
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:36
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:42
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:43
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:47
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:52
 
Move the cursor
w
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
50%
3:1
 

And again, with W

Initial Conditions
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:1
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:6
 
Move the cursor (again)
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:11
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:15
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:21
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:33
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:36
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:42
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
33%
2:47
 
Move the cursor
W
This·is·a·line·with·sample·text.
This·line·has·other·types/kinds·of·words·(and·WORDS)!
 
This·is·a·new·paragraph.·This·is·another·sentence.
And·this·is·another·line.
NORMAL
50%
3:1
 

The differences between how w and W behave are highlighted in this text.