danth / pathfinder.vim

Vim plugin to suggest better movements
MIT License
290 stars 4 forks source link

Do not show hint if its length is >= the number of keys pressed. #51

Open kovasap opened 1 year ago

kovasap commented 1 year ago

I find often this plugin will show me hints that are exactly equivalent to the keys I pressed or insignificantly different. It would be neat if the plugin was aware of my own keypresses (at the very least the number of them) and could use this information to not show hints that take the same number (or a larger number) of keypresses to accomplish what I did.

danth commented 1 year ago

Totally agree with what you said.

I looked into this a while ago, and it seems there is no simple way to record which keys were actually pressed by the user. The best solution I could find was to map every default keybinding to a function which records the key, and then falls back to the actual action. However this could interfere with any custom keybindings.

kovasap commented 1 year ago

Ah I see, darn.

On Fri, Jan 6, 2023, 7:38 AM Daniel Thwaites @.***> wrote:

Totally agree with what you said.

I looked into this a while ago, and it seems there is no simple way to record which keys were actually pressed by the user. The best solution I could find was to map every default keybinding to a function which records the key, and then falls back to the actual action. However this could interfere with any custom keybindings.

— Reply to this email directly, view it on GitHub https://github.com/danth/pathfinder.vim/issues/51#issuecomment-1373804435, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACC3NAXCWDLBKBIXL2I3CVTWRA36HANCNFSM6AAAAAATMLIGVE . You are receiving this because you authored the thread.Message ID: @.***>