How to map “jj” to Esc in emacs Evil mode

前端 未结 7 1781
迷失自我
迷失自我 2021-01-31 07:46

Recently I tried Emacs and found Evil helpful to keep my vim custom. I\'m used to typing \"jj\" to return normal mode from insert mode like many Vimers do but don\'t know how to

7条回答
  •  孤街浪徒
    2021-01-31 08:41

    I don't know whether it works with Evil, but for Emacs in general the KeyChord library is designed for this sort of thing.

    Try it and see?

    (key-chord-define evil-insert-state-map "jj" 'evil-normal-state)
    

提交回复
热议问题