danr / kakoune-easymotion

kakoune plugin for navigating like the easymotion vim mode
The Unlicense
53 stars 13 forks source link

Support vim-sneak like label mode (streak mode) #28

Open gibfahn opened 4 years ago

gibfahn commented 4 years ago

vim-sneak's label mode is a really nice alternative to easymotion, but I think (hope) it would be relatively easy to add as an option to this plugin.

https://github.com/justinmk/vim-sneak https://github.com/justinmk/vim-sneak/issues/58

The core difference is that instead of hitting the shortcut and then immediately being presented with a label on every word on the screen, you hit the shortcut and 2 chars, and then only the pairs of characters that match what you typed get labelled. In practice in neovim I (personally) find this much faster and more intuitive than Easymotion.

I'm interested in trying to put together a PR for this if I get time, but raising in case anyone else is interested.

lf94 commented 4 years ago

@gibfahn I'm extremely interested. Please please please do it!

Anomalocaridid commented 4 years ago

@gibfahn I would certainly be interested in it.

voroskoi commented 3 years ago

Hi,

I am sorry for posting it here, I hope @danr will not mind it.

I have tried to understand python code to implement this, but I have ended up writing an alternative in lua. Feel free to try it and report back the result for me: https://git.sr.ht/~voroskoi/easmymotion.kak

Again, sorry for the noise.

danr commented 3 years ago

Cool! I like how you put the entire lua source in a string on https://git.sr.ht/~voroskoi/easmymotion.kak/tree/master/easymotion.kak#L2 :fist_oncoming:

voroskoi commented 3 years ago

I can remember that it was not my idea, but I can not figure out where did I saw that so I can not give proper credit, sorry.