delete-window
). The last character
in this key sequence is a zero.
delete-other-windows
).
kill-buffer-and-window
). The last character in this key
sequence is a zero.
enlarge-window
).
enlarge-window-horizontally
).
shrink-window-horizontally
).
shrink-window-if-larger-than-buffer
).
balance-windows
).
mouse-delete-other-windows
).
mouse-delete-window
).
To delete a window, type C-x 0 (delete-window
). (That is
a zero.) The space occupied by the deleted window is given to an
adjacent window (but not the minibuffer window, even if that is active
at the time). Once a window is deleted, its attributes are forgotten;
only restoring a window configuration can bring it back. Deleting the
window has no effect on the buffer it used to display; the buffer
continues to exist, and you can select it in any window with C-x
b.
C-x 4 0 (kill-buffer-and-window
) is a stronger command
than C-x 0; it kills the current buffer and then deletes the
selected window.
C-x 1 (delete-other-windows
) is more powerful in a
different way; it deletes all the windows except the selected one (and
the minibuffer); the selected window expands to use the whole frame
except for the echo area.
You can also delete a window by clicking on its mode line with Mouse-2, and delete all the windows in a frame except one window by clicking on that window's mode line with Mouse-3.
The easiest way to adjust window heights is with a mouse. If you press Mouse-1 on a mode line, you can drag that mode line up or down, changing the heights of the windows above and below it.
To readjust the division of space among vertically adjacent windows,
use C-x ^ (enlarge-window
). It makes the currently
selected window get one line bigger, or as many lines as is specified
with a numeric argument. With a negative argument, it makes the
selected window smaller. C-x }
(enlarge-window-horizontally
) makes the selected window wider by
the specified number of columns. C-x {
(shrink-window-horizontally
) makes the selected window narrower
by the specified number of columns.
When you make a window bigger, the space comes from one of its
neighbors. If this makes any window too small, it is deleted and its
space is given to an adjacent window. The minimum size is specified by
the variables window-min-height
and window-min-width
.
The command C-x - (shrink-window-if-larger-than-buffer
)
reduces the height of the selected window, if it is taller than
necessary to show the whole text of the buffer it is displaying. It
gives the extra lines to other windows in the frame.
You can also use C-x + (balance-windows
) to even out the
heights of all the windows in the selected frame.
See section Editing in the Minibuffer, for information about the Resize-Minibuffer mode, which automatically changes the size of the minibuffer window to fit the text in the minibuffer.
Go to the first, previous, next, last section, table of contents.