ggandor / flit.nvim

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

improv: allow non-multiline to search beyond monitor limit #32

Open MSMazaya opened 1 year ago

MSMazaya commented 1 year ago

Hi! I am using Flit for inline search and found that I miss the functionality that the default vim f/F has: the capability on searching beyond the monitor limit. For example, in the following video, I have a non-wrap markdown opened and I can't get to : with Flit, with this PR this would be possible.

https://user-images.githubusercontent.com/73002733/233508727-ca833221-8500-4f87-a5da-606cca088d94.mp4

ggandor commented 1 year ago

Hi, thanks! The problem with this simple workaround is that flit will label invisible positions, which is confusing. There are lots of possible ways to handle off-screen matches if we want that (we might tweak Leap itself), I have to think about it more.

MSMazaya commented 1 year ago

The problem with this simple workaround is that Flit will label invisible positions

I see, indeed that will be a problem. I got a few suggestions:

  1. What if I change it so that labels are present only for on-screen targets but still allow off-screen targets to be traversed via repeat motion only for inline search targets (because if this behavior exists on multiline search, it will be confusing)? But I guess this means that there will be necessary changes to Leap
  2. Or maybe should it be turned into a configuration instead so people will expect this (invisible positions existence) if they turn it on?

What are your thoughts?

There are lots of possible ways to handle off-screen matches if we want that (we might tweak Leap itself)

What are your ideas to do so? I will be happy to contribute/be assigned to this issue/feature :D