I am trying to extend evil-like conventions to comint mode so I can use vim-like key bindings from the shell. I also rebound C-c
to #'evil-normal-state
since that is what I use in vim (it isn't strictly equivalent to C-[
but I haven't run into the weird edge cases where that actually matters yet).
I am using the evil-define-key
macro to define comint-mode
-specific bindings in normal state that begin with SPC f
and so far that works great.
However, all the mode-specific key bindings beginning with C-c
are still there despite the fact that C-c
is bound to #'evil-normal-state
in every state. I don't want to globally rebind C-c
since that would interfere with emacs state.
What is the cleanest way to prevent comint-mode
from defining any additional key bindings at all since evil-mode is effectively managing all the keys?
I have tried adding
(setf comint-mode-map (make-keymap))
and
(setf comint-mode-map (make-sparse-keymap))
to my .emacs
file, but whenever I type M-x shell
, I get the error
Wrong type argument: keymapp, 1