Wednesday, June 19, 2013

Re: mappings time out bug?


On Jun 19, 2013 1:37 PM, "Liang Li" <q335r49@gmail.com> wrote:
>
> On Wednesday, June 19, 2013 5:19:06 AM UTC-4, ZyX wrote:
> > On Jun 19, 2013 1:13 PM, "Liang Li" <q33...@gmail.com> wrote:
> >
> > >
> >
> > > This behavior confuses me. It feels like a bug.
> >
> > >
> >
> > > I have the following mapping
> >
> > >
> >
> > > nnoremap gp `[v`]
> >
> > >
> >
> > > since 'g' is not mapped, it shouldn't timeout no matter what the timeout length is right? As expected, the built in mapping for gp, gv, etc. both work no matter how long one waits between the g and the p.
> >
> >
> > Wrong. There is no built-in mappings like gp. More, there is no normal command gp. What is being done there is invocation of the getchar-like function after pressing g. Think of it as a special submode: enter-g-command-tail.
>
> :help gp
>
> ["x]gp                  Just like "p", but leave the cursor just after the new
>                         text.  {not in Vi}

Don't point me to help. Take vim source code and look there. **There** is no gp mapping. There *is* code catching 'g' and using blocking read via getchar-like function to get next character ('p' in this case).

> --
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
--
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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment