I tried Spacemacs recently and I really liked the idea of their hybrid mode. But sadly, I can't figure out how to do a few things in Spacemacs so I'm thinking of just using Evil in regular Emacs. So, I'd really like to know if there's a way to enable Emacs movement and text-editing keys in Evil's insert and replace states. Has anyone tried this kind of thing? Any pointers would be appreciated.
Replace state works just fine here, I can navigate with arrow keys and C-f
/C-b
/C-n
/C-p
as expected. For insert state, it's as simple as customizing evil-disable-insert-state-bindings
to t
.
edit: Note that this has to be done before loading up Evil.
-
Thanks for the reply. I tried (require 'evil) (evil-mode 1) (setq-default evil-disable-insert-state-bindings t) And also reversing the order of the last two lines. But both the insert state and replace state try to, for example, autocomplete on
C-n
. – Aditya Kashi May 29 '18 at 23:39 -
You have to do the customization before loading up Evil, so if anything, but it before
(require 'evil)
. Generally,(require 'evil)
isn't required if you've installed it viapackage.el
, thanks to autoloads you can just call(evil-mode)
in your init file after(package-initialize)
has been called (like, by either calling it as early as possible or usingafter-init-hook
). – wasamasa May 30 '18 at 7:21
evil-mode
, I also thought the same way; and it was difficult to switch to full (or sort of full) Vim way. But you will get over it. I would highly recommend Practical Vim by Drew Neil. It is well worth the reading to get the best out of Vim orevil-mode
, especially if you are new to Vim. – A. Blizzard May 29 '18 at 14:06