More fine tuning of :wq :q

This commit is contained in:
Rawley Fowler 2022-05-28 18:51:51 -06:00 committed by GitHub
parent 023ef43379
commit 1e3d991ce6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,22 +74,20 @@
(evil-mode))
(defun selective-window-kill ()
(when (< 2 (count-windows))
(interactive)
(when (> (count-windows) 1)
(delete-window)))
(defun save-and-kill-buffer () ;; Saves and kills a buffer, vim style
(defun save-kill-buffer () ;; Saves and kills a buffer, vim style
(interactive)
(save-buffer)
(kill-buffer)
(selective-window-kill))
(defun kill-buffer-and-window ()
(interactive)
(kill-buffer)
(selective-window-kill))
(evil-ex-define-cmd "wq" 'save-and-kill-buffer)
(evil-ex-define-cmd "q" 'kill-buffer-and-window)
(evil-ex-define-cmd "q" 'selective-window-kill)
(evil-ex-define-cmd "kb" '(lambda ()
(interactive)
(kill-buffer-and-window)))
(use-package evil-collection
:after evil
@ -97,6 +95,8 @@
:config
(evil-collection-init))
(use-package evil-org)
;; Project mangement
(use-package projectile
:config