Reply to message «Re: visual block search and replace», 
sent 09:59:54 15 July 2011, Friday
by Christian Brabandt:

> > I don't see this in the help.
> 
> Well, it's not directly written there. But since \%V matches the
> visual area, you need +visual and according to :h +feature-list you
> need at least a small build of Vim for +visual
You don't need to have +visual to use \%V atom. But as you stated latter you do 
need to have +visual to make it match.

> > If you go to regexp.c and search for `case 'V'' you will see that it
> > is not surrounded by #ifdef. So you can disable visual mode, but you
> > can't disable \%V atom (maybe it will just always match).
>
> Well you looked at the wrong place. In your place you found that Vim
> will search for the RE_VISUAL atom. But if you look further down
> you'll find 'case RE_VISUAL' which is the place where Vim tries to
> actually match what it is looking for (regmatch() function in
> regexp.c) And this place is surrounded by #ifdef FEAT_VISUAL.
It won't trigger E71 error, so this does not matter. Replace `always' with 
`never' in the last sentence and you will get correct assumption. Nothing else 
is false.

Original message:
> On Fri, July 15, 2011 4:38 am, ZyX wrote:
> > Christian Brabandt:
> >> According to the help \%V is only available, if Vim is compiled as small
> >> built (or larger), cause it needs +visual.
> > 
> > I don't see this in the help.
> 
> Well, it's not directly written there. But since \%V matches the
> visual area, you need +visual and according to :h +feature-list you
> need at least a small build of Vim for +visual
> 
> (Not sure, why my tiny vim contains +visual. Can anybody reproduce
> this?)
> 
> > If you go to regexp.c and search for `case 'V'' you will see that it
> > is not surrounded by #ifdef. So you can disable visual mode, but you
> > can't disable \%V atom (maybe it will just always match).
> 
> Well you looked at the wrong place. In your place you found that Vim
> will search for the RE_VISUAL atom. But if you look further down
> you'll find 'case RE_VISUAL' which is the place where Vim tries to
> actually match what it is looking for (regmatch() function in
> regexp.c) And this place is surrounded by #ifdef FEAT_VISUAL.
> 
> This means, that a build of vim without +visual won't match anything.
> 
> regards,
> Christian

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to