Bind Cz in evil mode to escape into the shell
In Emacs evil mode, the key combo C-z
is to switch evil mode. I would like to restore it to escape into the shell. How should I do it?
I have read about eshell, it seems great, but for now I would like to work with my zsh shell first.
It seems like a long term meant for this job, but I think shell escape is fine for me since I'm used to this thread in Vim.
Thanks for reading.
+3
source to share
2 answers
Just follow the same requirement and here's my settings:
(add-to-list 'load-path "~/.emacs.d/evil")
(add-to-list 'load-path "~/.emacs.d/evil/lib")
(setq evil-toggle-key ""); remove default evil-toggle-key C-z, manually setup later
(require 'evil)
(evil-mode 1)
;; remove all keybindings from insert-state keymap, use emacs-state when editing
(setcdr evil-insert-state-map nil)
;; ESC to switch back normal-state
(define-key evil-insert-state-map [escape] 'evil-normal-state)
Ref: 1.https://gist.github.com/kidd/1828878 2.https
: //askubuntu.com/questions/99160/how-to-remap-emacs-evil-mode-toggle-key-from-ctrl -z
+2
source to share