ggandor / flit.nvim

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

Options to disable `flit.nvim` when recording macros? #28

Open GreenSleeper opened 1 year ago

GreenSleeper commented 1 year ago

flit.nvim enchances the f t command by labeling mutiple matches to jump to. But when I'm recording a macro, if I use f or t command in the macro, sometimes it will mess up the macro behavior and jump to somewhere i didn't intend to. For example, I records a macro of f,h, meaning find next , and move one character left, then i apply this macro to multiple lines. But if these is a label h existing after f, the h will jump to it, making the macro totally unpredictable.

ggandor commented 1 year ago

I guess you can add autocommands to unmap f/t on RecordingEnter and re-init flit on RecordingLeave. (Or simply set multiline = false.) But that only solves the recording part. See also https://github.com/ggandor/lightspeed.nvim/issues/14.

A less than perfect solution is to include turning flit on/off in the recording itself :)