justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.26k stars 88 forks source link

Ahead of time labels #289

Closed milisims closed 2 years ago

milisims commented 2 years ago

Are ahead-of-time labels possible to implement for a sneak like in in ggandor/lightspeed.nvim? To summarize, they behave as: start sneaking, type x. Label all x matches now, while the user presses another character. While typing that second character, they are able to read the label they'll need to type next. If yes but you don't have time, would you be interested in a PR? It feels very nice to use.

ggandor commented 2 years ago

The question is, what you mean by "possible". Sneak handles all motions in a uniform way, f/t/s are just specific invocations of a common wrapper function, with which you can create any custom motions, regarding pattern length, inclusiveness, etc., and the invariant of course is that you get the whole pattern from the user first, and then do the jump/highlighting/etc. (Back)porting "lightspeed" mode to Sneak would imply a complete, almost from-scratch rewrite I guess.

That said, if @justinmk has the slightest interest in this, I'd be happy to be of assistance as my time allows, to give back at least something to the parents, so to say.

justinmk commented 2 years ago

IIRC this was a feature of easymotion. It's intentionally out of scope for sneak, to avoid intermediate "phases" as much as possible. There really shouldn't be so much time between the first key and the second... if there is that much hesitation or friction, might as well use /.

@ggandor thank you for the offer :)