reddit / emacs

Evil respects visual line mode only in insert state (not in normal or visual state)

Glass_You8757 ยท 2022-03-23 06:07
I use `evil-respect-visual-line-mode` to try to get the evil commands (hjkl, but also yy, dd, etc) to work on visual lines. The navigation works fine in the insert state, but when I switch to normal state, evil goes back to only working with buffer lines. Is this behaviour familiar to anyone? I managed to fix the navigation problem by getting rid of `evil-respect-visual-line-mode` and instead doing the following ([source](https://www.reddit.com/r/emacs/comments/fzw73c/comment/fn6i29p/?utm_source=share&utm_medium=web2x&context=3)): `(define-key evil-motion-state-map [remap evil-next-line] #'evil-next-visual-line)` `(define-key evil-motion-state-map [remap evil-previous-line] #'evil-previous-visual-line)` But this only works on navigation, not on yanking, deleting, etc.