Make view-mode closable with q in evil

View-mode was not properly evilified which prevented evil users
from closing it with q. This is now globally fixed not only for
`notmuch-mode`.
This commit is contained in:
Maximilian Wolff 2020-03-17 08:40:02 +01:00
parent 053f6da6c6
commit 2e0f4acad5
No known key found for this signature in database
GPG Key ID: 2DD07025BFDBD89A
2 changed files with 12 additions and 3 deletions

View File

@ -98,11 +98,9 @@
"v" #'notmuch-hello-versions
"z" #'notmuch-tree
"M-=" #'notmuch-refresh-all-buffers)
;; Make notmuch message mode and help view exitable with q
;; Make notmuch message mode closable via q
(evil-define-key 'normal notmuch-message-mode-map
"q" #'message-kill-buffer)
(evil-define-key 'normal view-mode-map
"q" #'View-quit)
(evilified-state-evilify-map notmuch-show-mode-map
:mode notmuch-show-mode
:bindings

View File

@ -16,6 +16,7 @@
centered-cursor-mode
(compile :location built-in)
(doc-view :location built-in)
(view :location built-in)
golden-ratio
(grep :location built-in)
(info+ :location local)
@ -207,6 +208,16 @@
(doc-view-minor-mode))
ad-do-it)))))
(defun spacemacs-navigation/init-view ()
(use-package view
:defer t
:init
;; Add binding via mode symbole to have a local binding set
;; after loading view mode. If not done this way the new bindings
;; will only be affective after the user pressing `q' once.
(evil-define-key 'normal 'view-mode
"q" #'View-quit)))
(defun spacemacs-navigation/init-golden-ratio ()
(use-package golden-ratio
:defer t