Function: evil--insert-line
evil--insert-line is a byte-compiled function defined in
evil-commands.el.
Signature
(evil--insert-line COUNT VCOUNT NON-BLANK-P)
Documentation
Switch to insert state at the beginning of the current line.
If NON-BLANK-P is non-nil, point is placed at the first non-blank character on the current line. If NON-BLANK-P is nil, point is placed at column 0, or the beginning of visual line. The insertion will be repeated COUNT times. If VCOUNT is non nil it should be number > 0. The insertion will be repeated in the next VCOUNT - 1 lines below the current one.
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
(defun evil--insert-line (count vcount non-blank-p)
"Switch to insert state at the beginning of the current line.
If NON-BLANK-P is non-nil, point is placed at the first non-blank character
on the current line. If NON-BLANK-P is nil, point is placed at column 0,
or the beginning of visual line. The insertion will be repeated COUNT times.
If VCOUNT is non nil it should be number > 0. The insertion will be repeated
in the next VCOUNT - 1 lines below the current one."
(push (point) buffer-undo-list)
(let ((move-fn (if non-blank-p #'evil-first-non-blank #'evil-beginning-of-line)))
(if (and visual-line-mode
evil-respect-visual-line-mode)
(goto-char
(max (save-excursion
(funcall move-fn)
(point))
(save-excursion
(beginning-of-visual-line)
(point))))
(funcall move-fn))
(setq evil-insert-count count
evil-insert-lines nil
evil-insert-vcount
(and vcount
(> vcount 1)
(list (line-number-at-pos)
move-fn
vcount))))
(evil-insert-state 1))