How do I combine multiple Ex commands into a single undo step in Vim?
:undojoin
When writing Vim scripts or running multiple Ex commands, each command normally creates a separate undo entry.
33 results for "block append A"
:undojoin
When writing Vim scripts or running multiple Ex commands, each command normally creates a separate undo entry.
80i-<Esc>
Vim's insert commands accept a count prefix that repeats everything you type.
:/start/,/end/ {command}
Vim's range addressing lets you specify a line range using search patterns instead of explicit line numbers.
qaI<li><Esc>A</li><Esc>jq
This macro wraps each line in tags by inserting the opening tag at the start and appending the closing tag at the end.
:let @a=@1
When you delete full lines repeatedly, Vim rotates those deletions through numbered registers.
:set virtualedit=onemore
By default, Vim's cursor cannot go past the last character of a line in normal mode — pressing $ lands on the final character, not after it.
:g/pattern/yank A
The :g command combined with yank A (uppercase A to append) lets you collect every line matching a pattern into a single register without overwriting previous c
command-line #editing #ex-commands #global-command #registers #filtering
<C-r><C-o>{register}
The standard {reg} pastes register contents in Insert mode, but Vim may auto-indent multi-line text to match the current indentation level — sometimes manglin
:
In Visual mode, typing : does more than open the command line: Vim automatically inserts the exact selection range as '.
A
The A command moves the cursor to the end of the current line and enters insert mode.
:0put
The :put Ex command inserts register contents as a new line below the specified line number.
:'<,'>normal A;
The :normal command executes normal-mode keystrokes on every line in a range.
command-line #command-line #ex-commands #editing #normal-mode #batch-editing
gI
Most Vim users know I to insert at the start of a line — but I actually jumps to the first non-blank character, skipping leading whitespace.