20.3 Using Other Windows
C-x o
Select another window ( other-window
).
C-M-v
Scroll the next window upward ( scroll-other-window
).
C-M-S-v
Scroll the next window downward ( scroll-other-window-down
).
C-M-S-l
Recenter the next window ( recenter-other-window
).
mouse-1
mouse-1
, in the text area of a window, selects the window and
moves point to the position clicked. Clicking in the mode line
selects the window without moving point in it.
With the keyboard, you can switch windows by typing C-x o
( other-window
). That is an o
, for “other”, not a zero.
When there are more than two windows, this command moves through all the
windows in a cyclic order, generally top to bottom and left to right.
After the rightmost and bottommost window, it goes back to the one at
the upper left corner. A numeric argument means to move several steps
in the cyclic order of windows. A negative argument moves around the
cycle in the opposite order. When the minibuffer is active, the
minibuffer window is the last window in the cycle; you can switch from
the minibuffer window to one of the other windows, and later switch
back and finish supplying the minibuffer argument that is requested.
See Editing in the Minibuffer.
The other-window
command will normally only switch to the next
window in the current frame (unless otherwise configured). If you
work in a multi-frame environment and you want windows in all frames
to be part of the cycle, you can rebind C-x o
to the
next-window-any-frame
command. (See Changing Key Bindings Interactively, for how to
rebind a command.)
The usual scrolling commands (see Controlling the Display) apply to the selected
window only, but there are also commands to scroll the next window.
C-M-v
( scroll-other-window
) scrolls the window that
C-x o
would select. In other respects, the command behaves like
C-v
; both move the buffer text upward relative to the window, and
take positive and negative arguments. (In the minibuffer, C-M-v
scrolls the help window associated with the minibuffer, if any, rather
than the next window in the standard cyclic order; see Editing in the Minibuffer.) C-M-S-v
( scroll-other-window-down
) scrolls the
next window downward in a similar way. Likewise, C-M-S-l
( recenter-other-window
) behaves like C-l
( recenter-top-bottom
) in the next window.
If you set mouse-autoselect-window
to a non- nil
value,
moving the mouse over a different window selects that window. This
feature is off by default.