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



Hum, I had this as the first lines of my plugin

# no delays for mode switching.
export KEYTIMEOUT=1

https://github.com/ninrod/nin-vi-mode/blob/master/nin-vi-mode.plugin.zsh#L1-L2

I guess I would have to type really fast for `ys` to work with this
configuration.


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

> Filipe Silva wrote:
> > for instance, the `ys` chord is not being picked up.
> >
> > supose i have a word: `abcde` and the cursor is in `c`. if I'm in
> > normal mode and type `ys` zle thinks that I've hit `s` and deletes the
> > `c` character and puts me in insert mode.
> >
> > Maybe it's a bug?
>
> I think this occurs if you don't type ys fast enough. What have you got
> $KEYTIMEOUT set to? Try typing the ys especially fast. And perhaps try
> binding ys to something that will be obvious like kill-whole-line to see
> if it is surround that is failing or the key binding.
>
> 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,
> such as y, correspond to a widget, such as vi-yank, that needs to wait
> for a movement. This also allows tricks like
>   bindkey -a -s 'cw' 'dwi'
> to work much as the equivalent vi map.
>
> Similarly, I can define
>   bindkey -s -a "gUU" "gUgU"
> but because vi-uppercase is not a builtin widget, I need to hit the keys
> fast even in 5.2.
>
> > On Wed, Jun 22, 2016 at 10:19 AM, Filipe Silva <filipe.silva@xxxxxxxxx>
> > wrote:
> > > I've fixed the bug including the following condition:
>
> Thanks for that!
>
> Oliver
>


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