More fine tuning of :wq :q
This commit is contained in:
parent
023ef43379
commit
1e3d991ce6
1 changed files with 9 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue