Use different function for :cleanup
This commit is contained in:
parent
a7dc91e7bf
commit
510e7116c8
3 changed files with 14 additions and 3 deletions
|
@ -295,5 +295,3 @@ project."
|
|||
(when (called-interactively-p 'interactive)
|
||||
(message "Cleaned up %s buffers" n))))
|
||||
|
||||
(after! evil
|
||||
(evil-set-command-properties #'doom/cleanup-buffers :ex-bang t))
|
||||
|
|
|
@ -357,6 +357,17 @@ the workspace and move to the next."
|
|||
((> (length (+workspace-list)) 1)
|
||||
(+workspace/delete current-persp-name))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace/cleanup ()
|
||||
"Clean up orphaned buffers and processes."
|
||||
(interactive)
|
||||
(let ((buffers (cl-remove-if #'persp--buffer-in-persps (buffer-list)))
|
||||
(n (doom-kill-process-buffers)))
|
||||
(mapc #'kill-buffer buffers)
|
||||
(when (called-interactively-p 'any)
|
||||
(message "Cleaned up %d buffers and %d processes"
|
||||
(length buffers) n))))
|
||||
|
||||
|
||||
;;
|
||||
;; Tabs display in minibuffer
|
||||
|
|
|
@ -46,7 +46,9 @@
|
|||
(ex! "grevert" #'git-gutter:revert-hunk)
|
||||
|
||||
;; Dealing with buffers
|
||||
(ex! "clean[up]" #'doom/cleanup-buffers)
|
||||
(evil-set-command-properties #'+workspace/cleanup :ex-bang t)
|
||||
|
||||
(ex! "clean[up]" #'+workspace/cleanup)
|
||||
(ex! "k[ill]" #'doom/kill-this-buffer)
|
||||
(ex! "k[ill]all" #'+hlissner:kill-all-buffers)
|
||||
(ex! "k[ill]m" #'+hlissner:kill-matching-buffers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue