evil-escape icon indicating copy to clipboard operation
evil-escape copied to clipboard

Visual mode exits when selecting lines down with evil-escape-key-sequence 'jk'

Open stevensona opened this issue 7 years ago • 3 comments

With evil-escape-key-sequence set to "jk", in visual mode, I can't hold 'j' to select multiple lines because it exits visual mode. Highlighting lines up works as expected.

On spacemacs develop branch.

stevensona avatar Oct 02 '17 17:10 stevensona

https://github.com/syl20bnr/evil-escape/pull/61

add

(push 'visual evil-escape-excluded-states)

to exclude visual from evil-escape

thanks to @weaksauce on spacemacs gitter.

stevensona avatar Oct 02 '17 21:10 stevensona

if you are only pressing j and not k this bug is probably still valid. I just put that in my config because i only really want jk or kj to get me out of insert mode and not from all the other ancillary modes.

fiveNinePlusR avatar Oct 02 '17 22:10 fiveNinePlusR

#61

add

(push 'visual evil-escape-excluded-states)

to exclude visual from evil-escape

thanks to @weaksauce on spacemacs gitter.

I've experienced an opposite issue using doom-emacs: after remapping evil-escape-key-sequence to 'fd' (useful to left-handed people) there isn't a straight way to force exiting the visual mode with the escape sequence. Have found that 'visual is in the evil-escape-excluded-states by default. So adding the following snippet resolves my issue:

(after! evil-escape
  (setq evil-escape-key-sequence "fd")
  ;; Allow to escape from the visual state as from insert.
  (delete 'visual evil-escape-excluded-states))
;;

illia-danko avatar Aug 19 '20 08:08 illia-danko