Rework editing style toggles

Put the toggles on SPC t E with
SPC t E h -> holy-mode
SPC t E y -> hybrid-mode

Make the mode-line diminished lighter consistent with the key bindings,
so holy is Ⓔh and hybrid is Ⓔy

Add seamless switch between holy and hybrid.
This commit is contained in:
syl20bnr 2015-09-23 23:27:51 -04:00
parent ea805fdc7a
commit 7e8c275bc5
2 changed files with 22 additions and 15 deletions

View File

@ -630,7 +630,7 @@ make the emacs state the default state everywhere.
Set the =dotspacemacs-editing-style= variable to =emacs= in the dotfile.
In Emacs style the leader is available on ~M-m~. It is possible to dynamically
switch between evil and holy mode using ~SPC E H~ and ~M-m E H~.
switch between evil and holy mode using ~SPC t E h~ and ~M-m t E h~.
*** Hybrid
The hybrid editing style is like the Vim style except that insert state
@ -639,7 +639,7 @@ in hybrid mode is called the hybrid state and you have to map your key bindings
in =evil-hybrid-state-map= keymap instead of =evil-insert-state-map=.
Hybrid mode can be enabled by setting =dotspacemacs-editing-style= to =hybrid=.
To switch between evil and hybrid mode use ~SPC E Y~.
To switch between evil and hybrid mode use ~SPC t E y~ and ~M-m t E y~.
** States
=Spacemacs= has 10 states:
@ -879,14 +879,14 @@ and ~T~):
| ~SPC t L~ | toggle visual lines |
| ~SPC t n~ | show the absolute line numbers |
| Key Binding | Description |
|-------------+--------------------------------------------------------------|
| ~SPC T F~ | toggle frame fullscreen |
| ~SPC T f~ | toggle display of the fringe |
| ~SPC T m~ | toggle menu bar |
| ~SPC T M~ | toggle frame maximize |
| ~SPC T t~ | toggle tool bar |
| ~SPC T T~ | toggle frame transparency and enter transparency micro-state |
| Key Binding | Description |
|-------------+--------------------------------------------------------------|
| ~SPC T F~ | toggle frame fullscreen |
| ~SPC T f~ | toggle display of the fringe |
| ~SPC T m~ | toggle menu bar |
| ~SPC T M~ | toggle frame maximize |
| ~SPC T t~ | toggle tool bar |
| ~SPC T T~ | toggle frame transparency and enter transparency micro-state |
*Note*: These toggles are all available via the =helm-spacemacs= interface (press
~SPC f e h~ to display the =helm-spacemacs= buffer).
@ -1028,6 +1028,8 @@ can be reached using the =control= key.
| ~SPC t a~ | =ⓐ= | a | auto-completion |
| ~SPC t c~ | =ⓒ= | c | camel case motion with subword mode |
| =none= | =ⓔ= | e | [[https://github.com/edwtjo/evil-org-mode][evil-org]] mode |
| ~SPC t E h~ | =Ⓔh= | Eh | holy mode |
| ~SPC t E y~ | =Ⓔy= | Ey | hybrid mode |
| ~SPC t f~ | | | fill-column-indicator mode |
| ~SPC t F~ | =Ⓕ= | F | auto-fill mode |
| ~SPC t g~ | =ⓖ= | g | [[https://github.com/roman/golden-ratio.el][golden-ratio]] mode |

View File

@ -934,10 +934,13 @@ ARG non nil means that the editing style is `vim'."
(holy-mode))
(spacemacs|add-toggle holy-mode
:status holy-mode
:on (holy-mode)
:on (progn (when (bound-and-true-p hybrid-mode)
(hybrid-mode -1))
(holy-mode))
:off (holy-mode -1)
:documentation "Globally toggle holy mode."
:evil-leader "E H"))))
:evil-leader "tEh")
(spacemacs|diminish holy-mode " Ⓔh" " Eh"))))
(defun spacemacs-base/init-hybrid-mode ()
(use-package hybrid-mode
@ -946,11 +949,13 @@ ARG non nil means that the editing style is `vim'."
(when (eq 'hybrid dotspacemacs-editing-style) (hybrid-mode))
(spacemacs|add-toggle hybrid-mode
:status hybrid-mode
:on (hybrid-mode)
:on (progn (when (bound-and-true-p holy-mode)
(holy-mode -1))
(hybrid-mode))
:off (hybrid-mode -1)
:documentation "Globally toggle hybrid mode."
:evil-leader "E Y")
(spacemacs|diminish hybrid-mode " ⓗy" " hy"))))
:evil-leader "tEy")
(spacemacs|diminish hybrid-mode " Ⓔy" " Ey"))))
(defun spacemacs-base/init-ido-vertical-mode ()
(use-package ido-vertical-mode