1

How can I set J/K keys to go up and down in manpages?

In less the keys work, but for some reason, manpages have configured J to be used for go to line. So when I accidentally press J, I am always taken to the go to line: prompt.

Is there any way to disable it at least?

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77

1 Answers1

1

I found out the reason. For some reason, my PAGER environment variable was set to most.

The following command did the trick:

cp /usr/share/doc/packages/most/lesskeys.rc ~/.mostrc

Note: I could have also mapped the PAGER variable to less, but most is colorful. :)

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
  • 1
    That edit is surprising .`less` and `most` should both work the same as far as highlighting is concerned, since it's `man` itself that sets the highlighting - the pagers simply render what's given. – muru Sep 06 '22 at 03:14