Sentence Text Objects

After words, sentences are the next higher-order logical chunk of text that we work with, and Neovim is able to identify those as well. In Neovim, a sentence is defined as:

sentence
a sequence of words and WORDs that end with a ., !, or ?, followed by either a space, tab, or EOL.

Selecting the "inner" Sentence

Consider the text in the following buffer, noting that the cursor is currently located on line 2, in the middle of the sentence that begins with "For a long time" and ends with "the ferryman". Now, let's visually-select inside a sentence to see which text is included in the sentence text object:

Initial Condition
that·it·has·come,·let·me·leave.·For·a·long·time,·I've·been·waiting·for
this·hour;·for·a·long·time,·I've·been·Vasudeva·the·ferryman.·Now·it's
enough.·Farewell,·but,·farewell,·river,·farewell,·Siddhartha!"
 
Siddhartha·made·a·deep·bow·before·him·who·bid·his·farewell.
 
"I've·known·it,"·he·said·quietly.·"You'll·go·into·the·forests?"
 
"I'm·going·into·the·forests,·I'm·going·into·the·oneness,"·spoke
NORMAL
30%
3:5
 
Select inside sentence
vis
that·it·has·come,·let·me·leave.·For·a·long·time,·I've·been·waiting·for
this·hour;·for·a·long·time,·I've·been·Vasudeva·the·ferryman.·Now·it's
enough.·Farewell,·but,·farewell,·river,·farewell,·Siddhartha!"
 
Siddhartha·made·a·deep·bow·before·him·who·bid·his·farewell.
 
"I've·known·it,"·he·said·quietly.·"You'll·go·into·the·forests?"
 
"I'm·going·into·the·forests,·I'm·going·into·the·oneness,"·spoke
VISUAL
30%
3:7
 

Selecting "around" the Sentence

Note that the cursor remains in its initial position in the middle of the sentence, while the selected text extends both back to the start of the sentence, as well as forward to the end of the sentence. Also note that the content of the sentence consists of both word and WORD text objects.

In the first example we demonstrate selecting "around" a Sentence that contains only alphanumeric characters.

Initial Condition
that·it·has·come,·let·me·leave.·For·a·long·time,·I've·been·waiting·for
this·hour;·for·a·long·time,·I've·been·Vasudeva·the·ferryman.·Now·it's
enough.·Farewell,·but,·farewell,·river,·farewell,·Siddhartha!"
 
Siddhartha·made·a·deep·bow·before·him·who·bid·his·farewell.
 
"I've·known·it,"·he·said·quietly.·"You'll·go·into·the·forests?"
 
"I'm·going·into·the·forests,·I'm·going·into·the·oneness,"·spoke
NORMAL
30%
3:7
 
Select around sentence
vas
that·it·has·come,·let·me·leave.·For·a·long·time,·I've·been·waiting·for
this·hour;·for·a·long·time,·I've·been·Vasudeva·the·ferryman.·Now·it's
enough.·Farewell,·but,·farewell,·river,·farewell,·Siddhartha!"
 
Siddhartha·made·a·deep·bow·before·him·who·bid·his·farewell.
 
"I've·known·it,"·he·said·quietly.·"You'll·go·into·the·forests?"
 
"I'm·going·into·the·forests,·I'm·going·into·the·oneness,"·spoke
VISUAL
30%
3:8
 

As we saw in the previous section, selecting around the text object included the whitespace that separates this sentence from the following sentence.