Variable: evil-local-mode
evil-local-mode is a buffer-local variable defined in evil-core.el.
Documentation
Non-nil if Evil-Local mode is enabled.
Use the command evil-local-mode(var)/evil-local-mode(fun) to change this variable.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-core.el
(define-minor-mode evil-local-mode
"Minor mode for setting up Evil in a single buffer."
:init-value nil
(if evil-local-mode
(progn
(cl-pushnew 'evil-mode-map-alist emulation-mode-map-alists)
(evil-initialize-local-keymaps)
(when (minibufferp)
(setq-local evil-default-state 'insert)
(setq-local evil-echo-state nil))
(setq evil-input-method current-input-method)
(evil-initialize-state)
(add-hook 'input-method-activate-hook #'evil-activate-input-method t t)
(add-hook 'input-method-deactivate-hook #'evil-deactivate-input-method t t)
(add-hook 'activate-mark-hook 'evil-visual-activate-hook nil t)
;; FIXME: Add these hooks buffer-locally and remove when disabling
(add-hook 'pre-command-hook 'evil-repeat-pre-hook)
(add-hook 'post-command-hook 'evil-repeat-post-hook))
(evil-refresh-mode-line)
(remove-hook 'activate-mark-hook 'evil-visual-activate-hook t)
(remove-hook 'input-method-activate-hook #'evil-activate-input-method t)
(remove-hook 'input-method-deactivate-hook #'evil-deactivate-input-method t)
(activate-input-method evil-input-method)
(evil-change-state nil)))