syl20bnr / evil-escape

Customizable key sequence to escape from insert state and everything else in Emacs.
GNU General Public License v3.0
225 stars 42 forks source link

how can I use 'jj' to replace <esc> only in insert-state #66

Closed honmaple closed 8 years ago

honmaple commented 8 years ago

now I have set

(setq-default evil-escape-key-sequence "jj")

but I have some trouble in visual-state and neotree,I could't use 'j' to choice a file quickly.when I select text in visual-state,I need to wait a few second to select next line.

zzantares commented 8 years ago

Same problem here, did you manage it to solve it @honmaple?, I think I could use evil-escape-inhibit-functions but I don't know how (my elisp is a shame).

Edit: Never mind I thing I got it:

(setq evil-escape-inhibit-functions '(evil-visual-state-p))
honmaple commented 8 years ago

@ZzAntares wow,thank you very much,I could't solve it before,I jsut add (setq evil-escape-excluded-major-modes '(dired-mode neotree-mode evil-visual-state)) the neotree-mode work well,but it has no effect on evil-visual-state,now I can use emacs better,thank you

zzantares commented 8 years ago

You're welcome 👍