feature/evil: rewrite :mv & :rm (file move/delete commands)
This commit is contained in:
parent
877ae26a96
commit
388e5b4711
3 changed files with 76 additions and 45 deletions
|
@ -172,6 +172,19 @@ See `doom-real-buffer-p' for what 'real' means."
|
|||
(kill-buffer buffer)))
|
||||
(eq (current-buffer) buffer)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-force-kill-buffer (&optional buffer dont-save)
|
||||
"Kill BUFFER globally and ensure all windows previously showing BUFFER have
|
||||
switched to a real buffer."
|
||||
(interactive)
|
||||
(let* ((buffer (or buffer (current-buffer)))
|
||||
(windows (get-buffer-window-list buffer nil t)))
|
||||
(kill-buffer buffer)
|
||||
(dolist (win windows)
|
||||
(with-selected-window win
|
||||
(unless (doom-real-buffer-p)
|
||||
(doom/previous-buffer))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom-kill-buffer-and-windows (buffer)
|
||||
"Kill the buffer and delete all the windows it's displayed in."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue