On Do, 11 Mai 2017, Efraim Yawitz wrote:
> Hi,
>
> The docs for the matchit plugin say that the mappings in it may cause strange
> behavior, but I think this example is worth noting.
>
> I was trying to do yV% on lines like this:
>
> #ifdef SOMETHING
> ...
> #endif //SOMETHING
>
> expecting to yank all the lines, but what I got was everything up to the
> comment, i.e., the last line had only the #endif. A new uninstalled vim
> (without plugins) did what I had expected originally.
>
> After some debugging, what I found was that in this mapping in matchit.vim:
>
> onoremap <silent> % v:<C-U>call <SID>Match_wrapper('',1,'o') <CR>
>
> the 'v' in v:<C-U> was changing the operator to forced characterwise after my
> 'V' had tried to force it to forced linewise. Doing ounmap % got the behavior
> I was looking for.
>
> I couldn't find yet in the help what v:<C-U> is supposed to do, but what is
> significant is that the 'v' in that mapping is evidently being interpreted
> twice, once as a "force characterwise" signal, and again for what it 'really'
> means. I imagine this could cause problems in other plugins as well which use
> this construction.
I believe this is the same issue as the one mentioned in the neovim
issue tracker:
https://github.com/neovim/neovim/issues/5691
I have tried to contact Benji, but unfortunately, he did not react.
Best,
Christian
--
Das Leben besteht in dem, was ein Mensch den ganzen Tag über denkt.
-- Ralph Waldo Emerson
--
--
You received this message from the "vim_use" 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_use" 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.