Add evil-mode binding for :wq

This commit is contained in:
2025-11-10 14:56:20 +01:00
parent 3a3b501e57
commit d8851cea8e

View File

@@ -72,6 +72,7 @@
:straight t
:config
(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)
(evil-mode))
@@ -237,6 +238,11 @@
(switch-to-buffer (other-buffer (current-buffer) 1)))
(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
(use-package ace-window
:straight t