[mini.jump2d] Jump with second character from each spot #1860
Replies: 1 comment 15 replies
-
Thanks for sharing!
This for me breaks the purpose of dimming in the first place: indicate that certain lines have matches (while making labels more visible). If there is dimming before jumping has started, then this interpretation breaks (as before jumping all lines are dimmed). I don't think I like that.
Unfortunately, both of these do not go well together, because labels can overlap. Like in case of several consecutive same characters for There are solutions, of course. Like dynamically hiding already typed letter of matched spots (to clear the space for possible later labels from left to be visible). Or like showing only a single step ahead (like 'leap.nvim' seems to be doing). But I am not a fan of showing labels not at the target spot. Every time I tried it, it was always confusing to adapt to. In theory, showing labels one or two steps to the right is possible with a tweaked spotter:
This would still only show labels after one or two keys are typed, yes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
jump2d_include_second_character.mp4
Left: Jump2d
Right: Leap
The most important reason why I still use leap: Its promise that the second character of the spot I am targeting can always be typed after initiating the search. That way, I have more time to process the generated third char, which is shown immediately.
I would like to use jump2d, and have been thinking about an idiomatic implementation starting from MiniJump2d.builtin.single_character:
I am using this branch in my fork of mini.nvim.Init.lua:
Notes:
spots_add_steps
does not have to be public. Perhaps an internal table, returning a custom function when the spotter has a certain id?cc: @pkazmier
See also: Improve 'mini.jump2d' default config and jumping experience
Beta Was this translation helpful? Give feedback.
All reactions