Next: Displaying Buffers, Previous: Pop Up Window, Up: Windows
delete-window
).
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
).
To delete the selected window, type C-x 0
(delete-window
). (That is a zero.) Once a window is deleted,
the space that it occupied is given to an adjacent window (but not the
minibuffer window, even if that is active at the time). Deleting the
window has no effect on the buffer it used to display; the buffer
continues to exist, and you can still switch to it 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
) deletes all the windows,
except the selected one; the selected window expands to use the
whole frame. (This command cannot be used while the minibuffer window
is active; attempting to do so signals an error.)
The command C-x ^ (enlarge-window
) makes the selected
window one line taller, taking space from a vertically adjacent window
without changing the height of the frame. With a positive numeric
argument, this command increases the window height by that many lines;
with a negative argument, it reduces the height by that many lines.
If there are no vertically adjacent windows (i.e., the window is at the
full frame height), that signals an error. The command also signals
an error if you attempt to reduce the height of any window below a
certain minimum number of lines, specified by the variable
window-min-height
(the default is 4).
Similarly, C-x } (enlarge-window-horizontally
) makes
the selected window wider, and C-x {
(shrink-window-horizontally
) makes it narrower. These commands
signal an error if you attempt to reduce the width of any window below
a certain minimum number of columns, specified by the variable
window-min-width
(the default is 10).
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.
Mouse clicks on the mode line provide another way to change window heights and to delete windows. See Mode Line Mouse.