Wednesday, September 4, 2024

Re: Using mapping

On Tue, 3 Sep 2024 19:45:18 +0300
M <matthewtarasov@gmail.com> wrote:
> Christian Brabandt <cblists@256bit.org>:
>
> >
> > On Di, 03 Sep 2024, Enan Ajmain wrote:
> >
> > > Hi everyone,
> > >
> > > ":h using-<Plug>" explains the usecase of <Plug> in quite an obscure
> > > manner. Using examples from perspectives of plugin authors _and_ plugin
> > > users would be more helpful. It should specially inform the user that
> > > any mapping using the "<Plug>" keyword should be a recursive mapping.
> > >
> > > I think the doc should be updated. Maybe we can follow this vi.SO
> > > answer: https://vi.stackexchange.com/a/31013.
> >
> > Can you think of a concrete doc patch please?
>
> Actually, it's not written like this, because it's not like this. In a
> sense that any occurence of <plug>thing is always treated as recursive.
> So users (finally ;-) don't have to remember about it. I can't say when it
> was done exactly but more than a few months at least.

You're right. In both my Windows and Linux machines, I use the
(almost-) latest vim built from source. Recently I added a
non-recursive "<Plug>" mapping in my vimrc and it worked fine. But then
I saw that it didn't work in my WSL vim. Now I realize the version of
vim in WSL is 8.2. I guess there isn't any further need for the doc to
be updated. But if I do draft a doc patch, I'll open a PR.

--
Enan

> Yet if you believe that the docs should be improved, as Christian
> suggested, you can submit your patch.
> If registered on github then you can also create a pull request at
> https://github.com/vim/vim/pulls
> Both source code and documentation improvements are always welcome.
>
> Kind regards,
> Matvey
>

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240905024842.000015a7%40gmail.com.

No comments:

Post a Comment