visual-line-mode doesn´t work as expected with evil enabled
Doom Emacs:
C h v visual-line-mode is t. The lines in my .org text (the buffer where it's enabled) do get wrapped, however, pressing j k only moves up and down in a logical manner, and not in a visual manner. When evil mode is disabled, this doesn´t happen. I tried doom upgrade. The issue persists.
What value do you have for evil-respect-visual-line-mode?
nil. I changed it manually with (setq evil-respect-visual-line-mode t) to t, the behavior doesn´t change.
Ah, this is a bit of a gotcha in evil. The code that swaps the keybindings in evil is only called once, when evil is loaded:
https://github.com/emacs-evil/evil/blob/master/evil-integration.el#L434-L445
so it looks like you'll need to set this before loading evil in your init.el (or using the :init keyword in use-package).
Neither
(use-package-hook! evil
:pre-init
(setq evil-respect-visual-line-mode t)
t)
nor
(use-package-hook! evil
:pre-init
(setq evil-respect-visual-line-mode t))
or
(use-package-hook! evil
:pre-config
(setq evil-respect-visual-line-mode t))
works unfortunately. Now this is a dooms package manager issue I believe, because C h v evil-respect-visual-line-mode still shows nill.
Yeah, I'm not a Doom user, so can't help you there. But this issue does make me think we should make this easier in evil anyway. We could make it so setting at any time could enable this functionality. Worth a look. Not sure when I'll get to it, but hopefully soon.
Cheers!