Ozaki Kiichi wrote:
> The example of `\%V` in help-doc does not work.
>
> `vim -Nu NONE`
>
> ```vim
> set wrapscan
> " input 'foo123bar'
> normal ifoo123bar
> " set visual area 'foo123bar'
> normal 0ve
> /\%Vfoo.*bar\%V
> ```
>
> `E486: Pattern not found: \%Vfoo.*bar\%V`
>
> but pattern `/\%Vfoo.*ba\%Vr` matches.
>
> **NOTE:** Actually, `\%V` matches the following cases:
>
> * the next char of `\%V` is in Visual area; `\%Va`means `a` is in Visual area
> * otherwise (`\%V` is a trailing of the pattern), works as if the next char
> is `.` (i.e. `\%V.`)
>
> Other zero-width atoms also behave the same way.
Thanks. Yes, this can be confusing. I think it's worth explaining why
the \%V goes before the "r". Let's keep the pattern and explain the
difference.
--
hundred-and-one symptoms of being an internet addict:
56. You leave the modem speaker on after connecting because you think it
sounds like the ocean wind...the perfect soundtrack for "surfing the net".
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.