ggandor / leap-spooky.nvim

👻 Actions at a distance
The Unlicense
277 stars 7 forks source link

"yriw" requires quicker input than "yiw" #15

Open mitchellwrosen opened 1 year ago

mitchellwrosen commented 1 year ago

Hi, thanks for the plugin!

First an observation about regular old yiw:

However, the yirw key sequence behaves differently. It seems that some sort of timer (perhaps updatetime?) starts after i, and we only get to sneaking if the complete text object is input before the timer expires. Otherwise, we get returned to normal mode.

On my machine, I seem to only have a quarter of a second, which makes actually using leap-spooky rather more difficult that it ought to be, as I have to decide ahead of time the exact "yarw", "diMp", or whatever I'm trying to accomplish, and then input it without pauses.

Is there anything we can do about this, or is it perhaps a fundamental limitation?

Thanks!

ggandor commented 1 year ago

Hi! This depends on timeoutlen (the default is 1000, you might have set it to some smaller value).

Is there anything we can do about this, or is it perhaps a fundamental limitation?

I have no idea, to be honest.

mitchellwrosen commented 1 year ago

I see, thanks! Yeah -- my timeoutlen is 300 because I want reasonably quick help from which-key if I'm struggling to remember a mapping. But here, I kind of want infinite delay :).

It's probably not possible: https://github.com/folke/which-key.nvim/issues/272