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:
parent
053f6da6c6
commit
2e0f4acad5
|
@ -98,11 +98,9 @@
|
||||||
"v" #'notmuch-hello-versions
|
"v" #'notmuch-hello-versions
|
||||||
"z" #'notmuch-tree
|
"z" #'notmuch-tree
|
||||||
"M-=" #'notmuch-refresh-all-buffers)
|
"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
|
(evil-define-key 'normal notmuch-message-mode-map
|
||||||
"q" #'message-kill-buffer)
|
"q" #'message-kill-buffer)
|
||||||
(evil-define-key 'normal view-mode-map
|
|
||||||
"q" #'View-quit)
|
|
||||||
(evilified-state-evilify-map notmuch-show-mode-map
|
(evilified-state-evilify-map notmuch-show-mode-map
|
||||||
:mode notmuch-show-mode
|
:mode notmuch-show-mode
|
||||||
:bindings
|
:bindings
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
centered-cursor-mode
|
centered-cursor-mode
|
||||||
(compile :location built-in)
|
(compile :location built-in)
|
||||||
(doc-view :location built-in)
|
(doc-view :location built-in)
|
||||||
|
(view :location built-in)
|
||||||
golden-ratio
|
golden-ratio
|
||||||
(grep :location built-in)
|
(grep :location built-in)
|
||||||
(info+ :location local)
|
(info+ :location local)
|
||||||
|
@ -207,6 +208,16 @@
|
||||||
(doc-view-minor-mode))
|
(doc-view-minor-mode))
|
||||||
ad-do-it)))))
|
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 ()
|
(defun spacemacs-navigation/init-golden-ratio ()
|
||||||
(use-package golden-ratio
|
(use-package golden-ratio
|
||||||
:defer t
|
:defer t
|
||||||
|
|
Loading…
Reference in a new issue