Full Emacs functionality in Insert mode
This commit is contained in:
parent
373024ac22
commit
2f816c8f91
1 changed files with 19 additions and 16 deletions
|
@ -290,25 +290,28 @@ 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
|
||||||
evil-want-keybinding nil
|
evil-want-keybinding nil
|
||||||
evil-want-integration t
|
evil-want-integration t
|
||||||
evil-escape-key-sequence "fd"
|
evil-escape-key-sequence "fd"
|
||||||
evil-escape-unordered-key-sequence t)
|
evil-escape-unordered-key-sequence t)
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(add-to-list 'evil-normal-state-modes 'shell-mode)
|
(setq evil-insert-state-map (make-sparse-keymap))
|
||||||
(add-to-list 'evil-emacs-state-modes 'term-mode)
|
(define-key evil-insert-state-map (kbd "<escape>") 'evil-normal-state)
|
||||||
(add-to-list 'evil-emacs-state-modes 'elfeed-search-mode)
|
|
||||||
(add-to-list 'evil-emacs-state-modes 'elfeed-show-mode)
|
|
||||||
|
|
||||||
;; Use escape to get out of visual mode, eh?
|
(add-to-list 'evil-normal-state-modes 'shell-mode)
|
||||||
(evil-define-key 'visual global-map (kbd "v") 'er/expand-region)
|
(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-show-mode)
|
||||||
|
|
||||||
(evil-mode))
|
;; Use escape to get out of visual mode, eh?
|
||||||
|
(evil-define-key 'visual global-map (kbd "v") 'er/expand-region)
|
||||||
|
|
||||||
|
(evil-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Using the key-chord project allows me to make Escape be on two key combo presses on both sides of my keyboard:
|
Using the key-chord project allows me to make Escape be on two key combo presses on both sides of my keyboard:
|
||||||
|
|
Loading…
Reference in a new issue