You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose adding some of the basic GNU less navigation shortcuts to the --pager view.
Background
I enjoy the formatting and syntax highlighting that the rich CLI provides and want to use the --pager option to be able to quickly navigate the document while maintaining the rich display.
I use GNU less for most of my document paging needs and so found myself instinctively trying to use its navigation shortcuts in the --pager view, which of course failed. The current navigation shortcuts for the --pager view feel clunky, as well as incomplete. (Seems loosely inspired by vi, which is fine, but I prefer less over vi when I need to page through a large document because of the single-key navigation commands.)
Changes
Looks like the changes need to be applied to the pager.PagerApp.on_key() method. Since the existing shortcuts don't collide with the less shortcuts, can simply add additional elif statements, which means the prior functionality will be maintained (and not break other people's muscle memory).
Corresponding PR inbound shortly.
Additional context
Ideally, as suggested in #19 (comment) , it would be great to have several of the more common navigation keybindings available with the --pager view. Perhaps with a set of --pager-<bindings-scheme> options, e.g., --pager-emacs or --pager-vi? That seems like a more extensive set of changes than what I'm proposing.
The text was updated successfully, but these errors were encountered:
Proposed Enhancement
I propose adding some of the basic GNU
less
navigation shortcuts to the--pager
view.Background
I enjoy the formatting and syntax highlighting that the
rich
CLI provides and want to use the--pager
option to be able to quickly navigate the document while maintaining the rich display.I use GNU
less
for most of my document paging needs and so found myself instinctively trying to use its navigation shortcuts in the--pager
view, which of course failed. The current navigation shortcuts for the--pager
view feel clunky, as well as incomplete. (Seems loosely inspired byvi
, which is fine, but I preferless
overvi
when I need to page through a large document because of the single-key navigation commands.)Changes
Looks like the changes need to be applied to the
pager.PagerApp.on_key()
method. Since the existing shortcuts don't collide with theless
shortcuts, can simply add additionalelif
statements, which means the prior functionality will be maintained (and not break other people's muscle memory).Corresponding PR inbound shortly.
Additional context
Ideally, as suggested in #19 (comment) , it would be great to have several of the more common navigation keybindings available with the
--pager
view. Perhaps with a set of--pager-<bindings-scheme>
options, e.g.,--pager-emacs
or--pager-vi
? That seems like a more extensive set of changes than what I'm proposing.The text was updated successfully, but these errors were encountered: