Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mitchellwrosen opened this issue May 6, 2023 · 2 comments
Open

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

mitchellwrosen opened this issue May 6, 2023 · 2 comments

Comments

@mitchellwrosen
Copy link

mitchellwrosen commented May 6, 2023

Hi, thanks for the plugin!

First an observation about regular old yiw:

  • If I input y, vim sits in operator-pending mode indefinitely.
  • From here I can press i and I'm still in operator-pending mode indefinitely.
  • I can press w whenever to complete my yank.

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
Copy link
Owner

ggandor commented May 7, 2023

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
Copy link
Author

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: folke/which-key.nvim#272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants