cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

neovim: support relative number row target from TERMINAL mode

Open fidgetingbits opened this issue 1 year ago • 1 comments

This is mostly for consideration, and filing so I don't forget. ATM I prefer to use relative rows in the terminal because they are faster to say and don't accumulate large values (like figuring out to say row 39 from 29339 for instance), etc.

It seems like it would probably be possible for cursorless in neovim to inspect the incoming command to check for a row reference. It could then query neovim to see if the relative number setting is true, and if so, figure out the row the cursor is on and then compute the absolute row number and patch the value in the command so cursorless gets what it expects?

This of course breaks down if you aren't in TERMINAL mode, because you don't know if the relative reference is up or down, but my most common use case historically for this is just pulling stuff down into the command line while I'm in TERMINAL mode. So it could be something only that triggers when in TERMINAL mode I think.

That said, some other things I'm going to experiment with to solve this problem:

  • simultaneous relative and absolute numbers
  • custom color for the last 2 digits of the absolute number
  • custom absolute numbers that only show the last 2 digits, except if divisible by 50

Maybe one of these will be sufficient that I don't think it's needed.

fidgetingbits avatar May 31 '24 06:05 fidgetingbits

I like the idea of the custom color for the last two digits

saidelike avatar May 31 '24 10:05 saidelike

I've been using the custom color plugin I whipped together for quite a while now and I think although it's still slower then relative, and that plugin needs a lot of work, I think I no longer care about supporting relative numbers s, so will close.

fidgetingbits avatar Jul 22 '24 07:07 fidgetingbits

@fidgetingbits should we move rowglow.nvim plugin to hands-free?

saidelike avatar Jul 22 '24 08:07 saidelike

Sure, can do.

fidgetingbits avatar Jul 22 '24 10:07 fidgetingbits