syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.66k stars 4.89k forks source link

Update/improve prefix functionality in window delete commands #16247

Closed dalanicolai closed 1 month ago

dalanicolai commented 8 months ago

(Spac)Emacs comes with the kill-buffer-and-window by default (on SPC w x). Also, deleting other windows (and buffers) simply by prefixing the window delete commands with a numerical prefix is very convenient. Therefore, this commit updates (or adds) the functionality of the prefix in the window delete commands.

Summary: to delete another window (and optionally its buffer), simply prefix SPC w d (or SPC w x) with the window number.

This functionality exists in the winum package itself (on winum-select-window-by-number), but for deletion that command requires a negative prefix which is cumbersome.

smile13241324 commented 1 month ago

I think this was waiting too long already