Variable: evil-insert-state-entry-hook
evil-insert-state-entry-hook is a variable defined in evil-states.el.
Value
(evil-start-track-last-insertion)
Documentation
Hooks to run when entering Insert state.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-states.el
(evil-define-state insert
"Insert state."
:tag " <I> "
:cursor (bar . 2)
:message "-- INSERT --"
:entry-hook (evil-start-track-last-insertion)
:exit-hook (evil-cleanup-insert-state evil-stop-track-last-insertion)
:input-method t
(cond
((evil-insert-state-p)
(add-hook 'post-command-hook #'evil-maybe-remove-spaces)
(add-hook 'pre-command-hook #'evil-insert-repeat-hook)
(setq evil-maybe-remove-spaces t)
(unless (eq evil-want-fine-undo t)
(evil-start-undo-step)))
(t
(remove-hook 'post-command-hook #'evil-maybe-remove-spaces)
(remove-hook 'pre-command-hook #'evil-insert-repeat-hook)
(evil-maybe-remove-spaces t)
(setq evil-insert-repeat-info evil-repeat-info)
(evil-set-marker ?^ nil t)
(unless (eq evil-want-fine-undo t)
(evil-end-undo-step))
(when (or (evil-normal-state-p evil-next-state)
(evil-motion-state-p evil-next-state))
(evil-move-cursor-back
(and (eolp) (not evil-move-beyond-eol)))))))