[clug] vim search: two blanks NOT at the start of a line

Brendan Jurd direvus at gmail.com
Sun May 3 05:46:04 UTC 2020


On Sun, 3 May 2020 at 15:06, steve jenkin via linux <linux at lists.samba.org>
wrote:

>
> I also use this pattern to find where sentences might end (any punctuation
> mark followed by a blank char):
>
>         '/[[:punct:]] ‘
>
>
The vim help doc for 'pattern' suggests this expression for
end-of-sentence.  According to the doc, it's very close to how vim's own
')' navigation command finds sentence breaks.

     [.!?][])"']*\($\|[ ]\)

Translates as "a period, exclamation or question mark, followed by zero or
more close parentheses, square brackets, single or double quotes, followed
by either and end-of-line or a space".

Cheers,
Brendan


More information about the linux mailing list