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

前端 未结 7 1783
迷失自我
迷失自我 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:47

    This works for me. It requires the KeyChord library:

    ;;Exit insert mode by pressing j and then j quickly
    (setq key-chord-two-keys-delay 0.5)
    (key-chord-define evil-insert-state-map "jj" 'evil-normal-state)
    (key-chord-mode 1)
    

    It is inspired by @phils answer above and based on Simon's Coding Blog: Emacs and Unity Every Day.

    0 讨论(0)
提交回复
热议问题