Leaving insert state now return to previous state instead of normal state
Handy to go back and forth between lisp and insert state.
This commit is contained in:
parent
8201b19a94
commit
646c25e031
|
@ -847,10 +847,9 @@ Key Binding | Function
|
|||
`ESC` | evil-normal-state
|
||||
|
||||
**Important Note:**
|
||||
Pressing `fd` while in `lisp state` will return to `normal state`,
|
||||
*but* pressing `fd` while in `insert state` will return to `lisp state`.
|
||||
`ESC` will always return to `normal state`.
|
||||
|
||||
Pressing `fd` while in `insert state` will return to previous evil state.
|
||||
This is handy to keep going back and forth between `lisp state` and
|
||||
`insert state`.
|
||||
|
||||
#### Magit
|
||||
|
||||
|
|
|
@ -18,9 +18,8 @@
|
|||
(global-set-key key `(lambda () (interactive) (spacemacs/switch-to-normal-mode ',seq 'keyboard-quit)))
|
||||
(define-key minibuffer-local-map key `(lambda () (interactive) (spacemacs/switch-to-normal-mode ',seq 'abort-recursive-edit)))
|
||||
(define-key evil-insert-state-map key `(lambda () (interactive)
|
||||
(if (eq major-mode 'emacs-lisp-mode)
|
||||
(spacemacs/switch-to-normal-mode ',seq 'evil-lisp-state)
|
||||
(spacemacs/switch-to-normal-mode ',seq 'evil-normal-state))))
|
||||
(spacemacs/switch-to-normal-mode ',seq (intern
|
||||
(format "evil-%s-state" evil-previous-state)))))
|
||||
(define-key evil-visual-state-map key `(lambda () (interactive) (spacemacs/switch-to-normal-mode ',seq 'evil-exit-visual-state)))
|
||||
(define-key evil-emacs-state-map key `(lambda () (interactive) (spacemacs/switch-to-normal-mode ',seq 'evil-normal-state)))
|
||||
(define-key evil-motion-state-map key `(lambda () (interactive) (spacemacs/switch-to-normal-mode ',seq 'evil-normal-state))))
|
||||
|
|
Loading…
Reference in a new issue