Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The use of brackets in VIM help pages

I'm trying to get into the habit of using VIM help pages, and came across the following line when reading about command-line ranges:

/{pattern}[/]   the next line where {pattern} matches     *:/*

Now, my understanding of the help-pages syntactic convention is that [/] marks an optional forward slash character. However, reading further, the following is said about the line above (emphasis mine):

The "/" and "?" after {pattern} are **required** to separate the pattern from
anything that follows.

Am I misunderstanding the syntactic convention?

like image 554
stensootla Avatar asked Dec 17 '25 19:12

stensootla


1 Answers

The "/" and "?" after {pattern} are required to separate the pattern from anything that follows.

If anything follows (such as an offset, e.g. /foobar/3 to go to the third line after the match), the / after a pattern is required.

like image 195
L3viathan Avatar answered Dec 20 '25 12:12

L3viathan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!