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))
|
(evil-mode))
|
||||||
|
|
||||||
(defun selective-window-kill ()
|
(defun selective-window-kill ()
|
||||||
(when (< 2 (count-windows))
|
(interactive)
|
||||||
|
(when (> (count-windows) 1)
|
||||||
(delete-window)))
|
(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)
|
(interactive)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(kill-buffer)
|
|
||||||
(selective-window-kill))
|
|
||||||
|
|
||||||
(defun kill-buffer-and-window ()
|
|
||||||
(interactive)
|
|
||||||
(kill-buffer)
|
|
||||||
(selective-window-kill))
|
(selective-window-kill))
|
||||||
|
|
||||||
(evil-ex-define-cmd "wq" 'save-and-kill-buffer)
|
(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
|
(use-package evil-collection
|
||||||
:after evil
|
:after evil
|
||||||
|
@ -97,6 +95,8 @@
|
||||||
:config
|
:config
|
||||||
(evil-collection-init))
|
(evil-collection-init))
|
||||||
|
|
||||||
|
(use-package evil-org)
|
||||||
|
|
||||||
;; Project mangement
|
;; Project mangement
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:config
|
:config
|
||||||
|
|
Loading…
Reference in a new issue