In vim, buffer can be split horizontally or vertically by :sp
or :vsp
. And a buffer can be closed by :q
.
Likewise in emacs, window can be split horizontally by C-x 2
, and vertically by C-x 3
.
And close all other window by C-x 1
.
But, how can I close only one window, like :q
in vim?
There are two options to collaps the split windows: delete-other-windows (Ctrl-x 1) delete-window (Ctrl-x 0)
Each Emacs window displays one Emacs buffer at any time. A single buffer may appear in more than one window; if it does, any changes in its text are displayed in all the windows where it appears. But the windows showing the same buffer can show different parts of it, because each window has its own value of point.
To open a new frame, select Make New Frame from the Files menu or press C-x 5 2 (for make-frame). Emacs makes a new frame containing the current buffer and puts it on top of the current frame.
Try C-x 0
, delete-window
. This is what C-h k
describes:
(delete-window &optional WINDOW)
Remove WINDOW from its frame.
WINDOW defaults to the selected window. Return nil.
Signal an error when WINDOW is the only window on its frame.
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