Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [vi-mode] widgets for case manipulation: `gU` and `U` in visual mode



Oliver,

thanks for pointing out the issue.

Having an ESCKEYTIMEOUT would be awesome. Setting KEYTIMEOUT to anything
above 5 is quite noticeable and laggy when I want to return to normal mode.
KEYTIMEOUT=1 is snappy, but then I lose out on the surround widget and
whatnot because I can't type `ys` fast enough.

On Wed, Jun 22, 2016 at 7:29 PM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:

> Filipe Silva wrote:
> >
> > "If this is the problem, it has also been fixed in newer versions by
> > making it continue waiting for further keys if the keys typed so far,
>
> > What recent versions would those be? since 5.2?
>
> Actually, the change was made in December 2014 - before 5.0.8. However,
> looking at your setup, it seems that you have in effect the following:
>   cutbuffer() {
>     zle .$WIDGET
>     echo $CUTBUFFER | pbcopy
>   }
>   zle -N vi-yank cutbuffer
>
> The custom cutbuffer widget is not marked as being a vi operator so gets
> invoked as soon as you press y. Currently, I can't think of an easy fix
> for this. In the past, we considered allowing flags to be set on custom
> widgets and I also pondered having a separate ESCKEYTIMEOUT variable.
>
> As an aside, you might want to guard against $CUTBUFFER starting with a
> - or containing \ escapes. Consider using printf or print -r --. Or
> perhaps pbcopy <<<"$CUTBUFFER"
>
> Oliver
>


Messages sorted by: Reverse Date, Date, Thread, Author