Full Emacs functionality in Insert mode

This commit is contained in:
Howard Abrams 2021-11-23 16:41:17 -08:00
parent 373024ac22
commit 2f816c8f91

View file

@ -290,7 +290,7 @@ Can we change Evil at this point? Some tips:
- [[https://nathantypanski.com/blog/2014-08-03-a-vim-like-emacs-config.html]] - [[https://nathantypanski.com/blog/2014-08-03-a-vim-like-emacs-config.html]]
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package evil (use-package evil
:init :init
(setq evil-undo-system 'undo-fu (setq evil-undo-system 'undo-fu
evil-disable-insert-state-bindings t evil-disable-insert-state-bindings t
@ -300,6 +300,9 @@ Can we change Evil at this point? Some tips:
evil-escape-unordered-key-sequence t) evil-escape-unordered-key-sequence t)
:config :config
(setq evil-insert-state-map (make-sparse-keymap))
(define-key evil-insert-state-map (kbd "<escape>") 'evil-normal-state)
(add-to-list 'evil-normal-state-modes 'shell-mode) (add-to-list 'evil-normal-state-modes 'shell-mode)
(add-to-list 'evil-emacs-state-modes 'term-mode) (add-to-list 'evil-emacs-state-modes 'term-mode)
(add-to-list 'evil-emacs-state-modes 'elfeed-search-mode) (add-to-list 'evil-emacs-state-modes 'elfeed-search-mode)