evil icon indicating copy to clipboard operation
evil copied to clipboard

Disable evil states for a given major mode

Open sasinhe opened this issue 2 years ago • 3 comments

I'm having some problems when using pdf-tools along with evil, some commands don't work when in visual state. How can I disable visual state only on pdf-mode?

Issue type

  • Question

Environment

Emacs version: 28.2 Operating System: Arch Linux Evil version: 1.15.0 Evil installation type: MELPA Graphical/Terminal: Graphical Tested in a make emacs session (see CONTRIBUTING.md): No

sasinhe avatar Sep 14 '22 11:09 sasinhe

Is this a duplicate of #1671 ?

tomdl89 avatar Sep 14 '22 13:09 tomdl89

I think it's the same problem, but while #1671 asks for a variable/extra function get implemented to prevent evil from entering 'visual-state' after a mouse-drag I just want to know how to disable visual state.

sasinhe avatar Sep 14 '22 16:09 sasinhe

How can I disable visual state only on pdf-mode?

Just do not execute any commands that enter Visual state, either by unbinding or not typing them? I do not see the issue.

Or add an advice to evil-visual-state that errors if major-mode is some value.

axelf4 avatar Aug 13 '23 10:08 axelf4