Function: evil-insert
evil-insert is an interactive and byte-compiled function defined in
evil-commands.el.
Signature
(evil-insert COUNT &optional VCOUNT SKIP-EMPTY-LINES)
Documentation
Switch to Insert state just before point.
The insertion will be repeated COUNT times on the next VCOUNT lines, starting at the same column. If SKIP-EMPTY-LINES is non-nil, the insertion will not be performed on lines on which the insertion point would be after the end of the lines. This is the default behaviour for Visual-state insertion.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
;;; Insertion commands
(defun evil-insert (count &optional vcount skip-empty-lines)
"Switch to Insert state just before point.
The insertion will be repeated COUNT times on the next VCOUNT lines,
starting at the same column.
If SKIP-EMPTY-LINES is non-nil, the insertion will not be performed
on lines on which the insertion point would be after the end of the
lines. This is the default behaviour for Visual-state insertion."
(interactive
(if (not (evil-visual-state-p))
(list (prefix-numeric-value current-prefix-arg))
(evil-visual-rotate 'upper-left)
(list (prefix-numeric-value current-prefix-arg)
(when (memq (evil-visual-type) '(line block))
(1+ (evil-count-lines evil-visual-point evil-visual-mark)))
t)))
(and evil-want-fine-undo vcount (evil-start-undo-step))
(if (and (evil-visual-state-p) (eq (evil-visual-type) 'line))
(evil-insert-line count vcount)
(setq evil-insert-count count
evil-insert-lines nil
evil-insert-vcount (and vcount
(> vcount 1)
(list (line-number-at-pos)
(current-column)
vcount))
evil-insert-skip-empty-lines skip-empty-lines)
(evil-insert-state 1)))