easymotion / vim-easymotion

Vim motions on speed!
http://www.vim.org/scripts/script.php?script_id=3526
7.5k stars 362 forks source link

[Suggestion] n-character search motion - trigger after delay #316

Closed deathmaz closed 7 years ago

deathmaz commented 7 years ago

Hi @haya14busa, there's a plugin for emacs called avy, it works pretty similar to vim-easymotion, but also it has avy-goto-char-timer feature, which works like n-character search motion but triggers after some delay, so you don't need to press Enter to trigger.

Is it possible to add this feature to vim-easymotion?

Thank you very much for your effort!

haya14busa commented 7 years ago

It's possible to implement it but I doubt the timer feature is really useful.

You can use https://github.com/haya14busa/incsearch-easymotion.vim and create a timer plugin for incsearch.vim to implement it.

hanschen commented 5 years ago

For what it's worth, I find the timer feature in avy extremely useful. It makes the n-character search motion work in a similar fashion to the 1-character version (no need to press Enter), except that you can refine your matches if needed. Overall it makes the motion feel very "smooth" because you don't need to press Enter (unlike the default / for example).

ankitp4t3l commented 3 years ago

I agree with Hans. I feel as if I intuitively know to type more characters in viewports full of text and less characters in viewports that have less characters.

The timer feature allows you to pick how many characters to type per invocation.

Currently, you are forced to choose between 1-char or 2-char globally if you only use one key to trigger easymotion/avy (s for me).

Timer doesn't force you.