ggandor / flit.nvim

Enhanced f/t motions for Leap
The Unlicense
366 stars 15 forks source link

Is it possible to repeat f/F/t/T with `;,`? #2

Closed megalithic closed 2 years ago

megalithic commented 2 years ago

Loving flit, however, I'm wondering if there is a way to override repeats with f/t and use the original vim maps for that (or make a way to configure it)?

Thanks much!!

ggandor commented 2 years ago

Not in a trivial way, but I'm currently working on a complete rewrite, so stay tuned.

megalithic commented 2 years ago

Yay, thanks @ggandor

tarsobcaldas commented 1 year ago

@ggandor I can repeat with ;,, but only right after searching with f. Is it possible to repeat the last search whenever ;, is pressed?

farzadmf commented 1 year ago

Anyone found a way/an alternative to have ; , properly working? 🤔

cc @ggandor hoping to get a response. I really like this plugin, but I use ; , after f and t. It would be so nice if could have them work as expected

murtaza64 commented 9 months ago

@ggandor any updates here? Loving your plugins but this is a minor annoyance I've noticed lately. I'm not sure how your plugin is structured but it seems like leap already has this functionality with repeat_keys right?

murtaza64 commented 9 months ago

Based on a quick glance through the code for leap, it looks like we don't save repeat state if the user provides the targets manually (https://github.com/ggandor/leap.nvim/blob/9f7cf0a87ca2c3f47df37ef6787d34a65604d248/fnl/leap/main.fnl#L722)

Why does it have to be this way?

ggandor commented 9 months ago

it seems like leap already has this functionality with repeat_keys right?

Yep, but it's for the default leap motion, the saved state is assumed to contain a 2-character pattern.

Why does it have to be this way?

We don't want to overwrite the repeat state with every custom call (e.g. treesitter selection). (I'm reluctant to add a new parameter to leap just for Flit, although technically we could save the state ourselves on LeapEnter or LeapLeave, if state.args.flit == true.)

TLDR, it's not a one-line tweak.

murtaza64 commented 9 months ago

Flit is almost perfect, so I would just say that I would love this feature (and I'm happy to take a stab at implementing it if you would accept a PR)