9

I'd like to remap the toggle key for emacs evil mode. From Ctrl+Z to something that won't confuse me like the CUA bindings (I'd like Ctrl+Alt+`, but I think that terms don't recognize that one).

In this external thread is a discussion on trying to do this with Viper mode.

Once one is fairly used to using less, Gmail, and Vimium, the vim key bindings for browsing are nice to go easy on the hands when mostly reading files. Less hitting the Ctrl which helps the hands/wrists.

2 Answers 2

7

No need to modify the source. Just customize "evil-toggle-key".

M-x customize-variable evil-toggle-key

You can also just set the variable using setq. Make sure you set that variable before emacs loads evil, since evil uses the variable's value when setting the keymaps up. For example, this is how it goes in my .emacs:

(setq evil-toggle-key "C-`")
(require 'evil)

:)

1
  • 1
    I think the OP should pick this for the answer. :)
    – Short
    Dec 22, 2015 at 5:12
2

I can modify the source by changing this line, to use ctrl backtick:

evil-vars.el

(defcustom evil-toggle-key "C-`"

I'd rather have a way that doesn't modify the source to make it easier to upgrade later, but this should work. This hack definitely works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .