Re: Wrong % behaviour (with matchit) when "language messages en" is within the scope on an if statement

2021-04-11 Fir de Conversatie Christian Brabandt
On So, 11 Apr 2021, Bram Moolenaar wrote: > > Doug Kearns wrote: > > > On Sun, 11 Apr 2021 at 22:53, Bram Moolenaar wrote: > > > It is possible to only match "endif" at the start of the line or after a > > > bar: > > > > > > '\:\%(^\||\)\s*el\%[seif]\>:\%(^\||\)\s*en\%[dif]\>,' > > >

Re: Wrong % behaviour (with matchit) when "language messages en" is within the scope on an if statement

2021-04-11 Fir de Conversatie Bram Moolenaar
Doug Kearns wrote: > On Sun, 11 Apr 2021 at 22:53, Bram Moolenaar wrote: > > It is possible to only match "endif" at the start of the line or after a > > bar: > > > > '\:\%(^\||\)\s*el\%[seif]\>:\%(^\||\)\s*en\%[dif]\>,' > > > > But then the cursor will move to the start of the line or

Re: Wrong % behaviour (with matchit) when "language messages en" is within the scope on an if statement

2021-04-11 Fir de Conversatie Doug Kearns
On Sun, 11 Apr 2021 at 22:53, Bram Moolenaar wrote: > It is possible to only match "endif" at the start of the line or after a > bar: > > '\:\%(^\||\)\s*el\%[seif]\>:\%(^\||\)\s*en\%[dif]\>,' > > But then the cursor will move to the start of the line or the bar. > Putting in \zs to

Re: Wrong % behaviour (with matchit) when "language messages en" is within the scope on an if statement

2021-04-11 Fir de Conversatie Bram Moolenaar
Tony wrote: > My vimrc includes the following snippet: > > if has('unix') > language messages C > else > language messages en > endif > > I just noticed that repeatedly hitting % (with matchit enabled) cycles > from the if to the else to the en in "language messages en" and back. > % on

Wrong % behaviour (with matchit) when "language messages en" is within the scope on an if statement

2021-04-10 Fir de Conversatie Tony Mechelynck
My vimrc includes the following snippet: if has('unix') language messages C else language messages en endif I just noticed that repeatedly hitting % (with matchit enabled) cycles from the if to the else to the en in "language messages en" and back. % on the final endif goes to the next outer