The Emacs manual only has an example to set a binding for a single command. How to do so for a sequence of commands. Specifically the following.
Which is practically single line scrolling.
You can use keyboard macros for that task. The link pretty much explains how to do it, for completeness here's what to do:
C-x (
to start recording a keyboard macro.C-x )
to stop recording the keyboard macro.M-x name-last-kbd-macro
to name the last-defined keyboard macro (i.e. the one you just defined).M-x insert-kbd-macro
to insert the code of the last defined macro at point, copy it into your init file.(global-set-key (kbd "M-n") 'my-macro)
into your init file (assuming you named the macro my-macro
).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With