Add evil-mode binding for :wq
This commit is contained in:
6
init.el
6
init.el
@@ -72,6 +72,7 @@
|
|||||||
:straight t
|
:straight t
|
||||||
:config
|
:config
|
||||||
(evil-define-key 'normal org-mode-map (kbd "<tab>") #'org-cycle)
|
(evil-define-key 'normal org-mode-map (kbd "<tab>") #'org-cycle)
|
||||||
|
(global-set-key [remap evil-save-and-close] 'save-and-kill-buffer-with-prejudice)
|
||||||
(global-set-key [remap evil-quit] 'kill-buffer-with-prejudice)
|
(global-set-key [remap evil-quit] 'kill-buffer-with-prejudice)
|
||||||
(evil-mode))
|
(evil-mode))
|
||||||
|
|
||||||
@@ -237,6 +238,11 @@
|
|||||||
(switch-to-buffer (other-buffer (current-buffer) 1)))
|
(switch-to-buffer (other-buffer (current-buffer) 1)))
|
||||||
(bind-key "M-p" 'switch-to-previous-buffer)
|
(bind-key "M-p" 'switch-to-previous-buffer)
|
||||||
|
|
||||||
|
(defun save-and-kill-buffer-with-prejudice ()
|
||||||
|
(interactive)
|
||||||
|
(save-buffer)
|
||||||
|
(kill-buffer-with-prejudice))
|
||||||
|
|
||||||
;; Ace for qucik window switching
|
;; Ace for qucik window switching
|
||||||
(use-package ace-window
|
(use-package ace-window
|
||||||
:straight t
|
:straight t
|
||||||
|
|||||||
Reference in New Issue
Block a user