Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim sentence motion

Tags:

vim

According to Vim's manual:

A sentence is defined as ending at a '.', '!' or '?' followed by either the end of a line, or by a space or tab.

However ( and ) normal-mode motions seem to have no effect if there's only one space between sentences:

First sentence. Second sentence.

But ( and ) work as expected if there are multiple spaces between sentences:

First sentence.  Second sentence.

My question is why ( and ) have no effect when sentences are separated with a single space?

like image 973
builder-7000 Avatar asked Mar 06 '18 08:03

builder-7000


1 Answers

This behavior is documented in Vim's manual (:help sentence):

If the 'J' flag is present in 'cpoptions', at least two spaces have to follow the punctuation mark; Tabs are not recognized as white space.

like image 111
builder-7000 Avatar answered Oct 05 '22 23:10

builder-7000