lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Restore behaviour of the n/N keys

Open bagonyi opened this issue 9 years ago • 8 comments

Would it be possible to make the behaviour of the n/N keys configureable, or have the old behaviour of n/N reassigned to other keys? I heavily rely on pressing "n" to move me to the next line.

Thanks

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39864756-restore-behaviour-of-the-n-n-keys?utm_campaign=plugin&utm_content=tracker%2F449456&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F449456&utm_medium=issues&utm_source=github).

bagonyi avatar Dec 08 '16 16:12 bagonyi

To clarify, there's a cluster of search hits and you're expecting 'n' to move to the next line instead of the next cluster? Do you think you can get used to using j/down-arrow to move to the next line after getting to a cluster?

tstack avatar Dec 08 '16 16:12 tstack

The problem is that our log lines tend to be quite long, so if I get to a cluster by pressing n, I don't necessarily know whether there is a hit the line below (because the match could be lots of screenful to the right). So yes, I would love to have the "move top line to next hit" (regardless of whether it is part of a cluster) behaviour restored / or remapped to other keys.

bagonyi avatar Dec 08 '16 16:12 bagonyi

Not knowing there is a search hit because it's off-screen sounds like a problem in-and-of-itself. I'd like to try and address that before reverting the n/N change.

tstack avatar Dec 08 '16 17:12 tstack

How about markers on either side? Just imagine one is right in the middle of a long log line, some pages to the right. Jump to the next line, the search term is somewhere near the beginning. Then we should get a marker to the left of course. However I think, jumping right to the occurrence is a better way.

leonie-gaertner-bg avatar Apr 12 '17 09:04 leonie-gaertner-bg

Thank you for the added markers. This helps, but please consider making the cluster search functionality toggleable (e.g. via a /ui/cluster-search config). Thanks.

bagonyi avatar Oct 08 '18 10:10 bagonyi

This is the only reason I haven't upgraded since 0.8.1. Any way I could help with this?

bagonyi avatar May 17 '19 11:05 bagonyi

In the near future the keymap will be user-configurable, so you'll be able to define the keys to do whatever you like.

tstack avatar May 17 '19 12:05 tstack

Hello @tstack, sorry to revive this old thread, but is it now possible to remap certain keys so that I can move between individual search results, as opposed to clusters of results? Thanks!

bagonyi avatar Jan 13 '22 22:01 bagonyi