In Emacs we can scroll inactive window using certain commands
But not all details are listed in the manual.
C-M-v can scroll down the other window
my intention is to scroll up the other window, how could I do that ?
In Emacs we can scroll inactive window using certain commands
But not all details are listed in the manual.
C-M-v can scroll down the other window
my intention is to scroll up the other window, how could I do that ?
Try C-M-S-v, which is scroll-other-window-down
.
You can find such key bindings by doing C-h b (describe-bindings
) which populates the *Help*
buffer with a list of all the key bindings and associated commands for the current buffer. A quick search through that for scroll-other
showed the binding you mentioned, as well as the one I listed.
C-u - C-M-v
. See: stackoverflow.com/a/60497723 –
Ilario On many terminals you can do M-PageUp and M-PageDn to scroll the other window. It's nice if you're already used to using PageUp/PageDn for scrolling.
M-PageUp
(i.e. M-<prior>
) and M-PageDown
(i.e. M-<next>
) are scroll-other-window
and scroll-other-window-down
. See this to learn how to rebind: gnu.org/software/emacs/manual/html_node/emacs/… –
Personage You can alternatively give a negative argument to C-M-v
.
Negative arguments can be given with almost any modifier combination.
In that case you can type C-M-- C-M-v
.
I use this (everyday) :
(define-key global-map [(meta up)] '(lambda() (interactive) (scroll-other-window -1)))
(define-key global-map [(meta down)] '(lambda() (interactive) (scroll-other-window 1)))
scroll down, (scroll-other-window)
scroll up, (scroll-other-window '-)
scroll-other-window is the native C API of Emacs, so it should work out of the box. Check its documentation.
Feel free to assign hot key for them
You could do C-u - C-M-v
(i.e. scroll-other-window
with ARG -
) if C-M-S-v
(i.e. scroll-other-window-down
) does not work for you, as could happen when using Emacs in a terminal.
Excerpt from C-h f scroll-other-window
:
Negative ARG means scroll downward. If ARG is the atom '-', scroll downward by nearly full screen.
M-<prior>
runs the command scroll-other-window-down (fn
option
up-arrow
on Mac)M-<next>
runs the command scroll-other-window (fn
option
down-arrow
on Mac)© 2022 - 2024 — McMap. All rights reserved.