ronisbr / TerminalPager.jl

Pure Julia implementation of the command less
MIT License
116 stars 8 forks source link

Feature request: `b` for :pageup to match less pager on linux #15

Closed vancleve closed 3 years ago

vancleve commented 3 years ago

Its right above SPACE so its easy to press instead of reaching for pageup

https://man7.org/linux/man-pages/man1/less.1.html

knuesel commented 3 years ago

Rather than creating a new issue I'll hijack this one to to ask for specific keybindings as you suggested on Discourse.

"Less" has a ton of redundant keybindings, so it may not make sense to support all of them. For what it's worth, here are the ones I find most useful:

ronisbr commented 3 years ago

Thanks @vancleve and @knuesel !

I will try to implement it. If we have some clash with existing key bindings, I will let you know so that we can discuss about it.

ronisbr commented 3 years ago

Hi @knuesel

I implemented '<' / '>', and 'b' to go back (making a nice pair with space). However, f is already used to freeze columns and rows.

I prefer to avoid those key bindings like CTRL+V/ALT+V and CTRL+F/CTRL+B. It just does not make sense for me.

Finally, those key bindings that takes a number will make the processing a lot more complicated. Right now, it is a 1 to 1 function (key binding => action). If I add numbers, then I need a state machine to take care of the command. I think it is an unnecessary complication for a pager.

Feel free to reopen if you disagree.