Close only one window in Emacs

In vim, a buffer can be divided horizontally or vertically into :sp or :vsp . And the buffer can be closed :q .

Similarly, in emacs, a window can be split horizontally at Cx 2 and vertically at Cx 3 . And close all other windows Cx 1 .

But how can I close only one window, for example :q in vim?

+4
source share
3 answers

Try Cx 0 , delete-window . Here is what Ch 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. 
+8
source

There is a delete-window that is bound to Cx 0 by default.

+2
source

You can do Ctrl - x 0 to close the current window, which is the default binding for delete-window

+2
source

Source: https://habr.com/ru/post/1494413/


All Articles