Function: evil-ex-normal
evil-ex-normal is an interactive and byte-compiled function defined in
evil-commands.el.
Signature
(evil-ex-normal BEG END &optional COMMANDS)
Documentation
The Ex normal command.
Execute the argument as normal command on each line in the
range. The given argument is passed straight to
execute-kbd-macro. The default is the current line.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
(evil-define-operator evil-ex-normal (beg end commands)
"The Ex normal command.
Execute the argument as normal command on each line in the
range. The given argument is passed straight to
`execute-kbd-macro'. The default is the current line."
:motion evil-line
(interactive "<r><a>")
;; replace ^[ by escape
(setq commands
(vconcat (mapcar (lambda (ch) (if (eq ch ?) 'escape ch))
commands)))
(let (markers evil-called-from-ex-p prefix-arg current-prefix-arg)
(goto-char beg)
(beginning-of-line)
(while (when (< (point) end)
(push (point-marker) markers)
(and (= (forward-line) 0) (bolp))))
(setq markers (nreverse markers))
(deactivate-mark)
(evil-force-normal-state)
(evil-with-single-undo
(dolist (marker markers)
(goto-char marker)
(ignore-errors (execute-kbd-macro commands))
(evil-force-normal-state)
(set-marker marker nil)))))