abougouffa / minemacs

MinEmacs: an Emacs configuration framework for daily use
https://abougouffa.github.io/minemacs/
MIT License
153 stars 16 forks source link

Improve vim operation efficiency #21

Closed donneyluck closed 1 year ago

donneyluck commented 1 year ago

https://github.com/redguardtoo/emacs.d/blob/8ea127c69cd6e5d6dbbe2c1dce91131c4a4c0cd2/lisp/init-evil.el#L236

Press kj to escape from evil-insert-state and everything else in Emacs. It’s much more efficient than ESC in Vim or C-g in Emacs

abougouffa commented 1 year ago

Can you please refactor it to:

(use-package evil-escape
  :straight t
  :hook (evil-mode . evil-escape-mode))

The user can customize the keybinding in its config.el file like this:

(with-eval-after-load 'evil-escape
  (setq evil-escape-key-sequence "kj"
        evil-escape-delay 0.3))
abougouffa commented 1 year ago

I've merged your commit and fixed it. Please refer the code above if you like to use "kj" instead of evil-escape's default "fd".