Improve editing-style toggles

problem:
The toggle editing style prefix: SPC t E
always shows the same names:
e -> emacs (holy-mode)
h -> hybrid (hybrid-mode)

This causes some confusion about how to
switch to the vim (evil-mode) editing style,
from emacs or hybrid state.

solution:
Show which editing styles one will switch to:

In evil-mode:
e -> emacs (holy-mode)
h -> hybrid (hybrid-mode)

In holy-mode:
e -> vim (evil-mode)
h -> hybrid (hybrid-mode)

In hybrid-mode:
e -> emacs (holy-mode)
h -> vim (evil-mode)
This commit is contained in:
duianto 2021-03-13 09:04:01 +01:00 committed by Maximilian Wolff
parent d424c8d1d1
commit f853124578
1 changed files with 14 additions and 6 deletions

View File

@ -592,9 +592,13 @@ Press \\[which-key-toggle-persistent] to hide."
(spacemacs|add-toggle holy-mode
:status holy-mode
:on (progn (when (bound-and-true-p hybrid-mode)
(hybrid-mode -1))
(holy-mode))
:off (holy-mode -1)
(hybrid-mode -1)
(spacemacs/declare-prefix "tEh" "hybrid (hybrid-mode)"))
(holy-mode)
(spacemacs/declare-prefix "tEe" "vim (evil-mode"))
:off (progn (holy-mode -1)
(spacemacs/declare-prefix "tEe" "emacs (holy-mode)"))
:off-message "evil-mode enabled."
:documentation "Globally toggle holy mode."
:evil-leader "tEe")
(spacemacs|diminish holy-mode " Ⓔe" " Ee")))))
@ -608,9 +612,13 @@ Press \\[which-key-toggle-persistent] to hide."
(spacemacs|add-toggle hybrid-mode
:status hybrid-mode
:on (progn (when (bound-and-true-p holy-mode)
(holy-mode -1))
(hybrid-mode))
:off (hybrid-mode -1)
(holy-mode -1)
(spacemacs/declare-prefix "tEe" "emacs (holy-mode)"))
(hybrid-mode)
(spacemacs/declare-prefix "tEh" "vim (evil-mode)"))
:off (progn (hybrid-mode -1)
(spacemacs/declare-prefix "tEh" "hybrid (hybrid-mode)"))
:off-message "evil-mode enabled."
:documentation "Globally toggle hybrid mode."
:evil-leader "tEh")
(spacemacs|diminish hybrid-mode " Ⓔh" " Eh")))))