Discussion:
Mapping macros in other minor modes
Tim Chase
2017-12-27 19:06:25 UTC
Permalink
Is there a way to remap keys in the ":" command-line and in the help
viewer?

In vim, I usually use control+P/N in the ":" command-line to recall
previous commands and was hoping to get similar ^P/^N functionality
to duplicate the functionality mutt provides with up/down.

Likewise, in the help pager (whatever mode you want to call it when
you hit "?" to get help), I tend to hit "j" or "k" to scroll like in
less(1) but those return me to wherever I was before I hit "?". Is
there a name for this mode so I can remap j/k to scrolling up/down in
help?

Thanks,

-tkc
Kevin J. McCarthy
2017-12-27 20:59:21 UTC
Permalink
Post by Tim Chase
Is there a way to remap keys in the ":" command-line and in the help
viewer?
The command line uses the "editor" map, while the help uses the "pager"
map.

To change the editor map, you could use
bind editor \Cp history-up
bind editor \Cn history-down

For the help, you could put
bind pager k previous-line
bind pager j next-line
--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
Tim Chase
2017-12-27 21:11:12 UTC
Permalink
Post by Kevin J. McCarthy
Post by Tim Chase
Is there a way to remap keys in the ":" command-line and in the
help viewer?
The command line uses the "editor" map, while the help uses the
"pager" map.
To change the editor map, you could use
bind editor \Cp history-up
bind editor \Cn history-down
For the help, you could put
bind pager k previous-line
bind pager j next-line
Perfect. Thanks!

-tkc

Loading...