How do I edit a recorded macro without re-recording it from scratch?
:let @a = "content"
When a recorded macro has a typo or needs a small tweak, you don't have to re-record it entirely.
1024 results for "i" a""
:let @a = "content"
When a recorded macro has a typo or needs a small tweak, you don't have to re-record it entirely.
:ball
The :ball command opens a window for every buffer in the buffer list.
@=
The @= command lets you type a Vimscript expression and execute the result as if it were a macro.
daw
The daw command deletes a word including one side of its surrounding whitespace.
:argdo norm @a | update
Combining :argdo with :norm @a lets you apply a recorded macro to every file in Vim's argument list — a powerful pattern for bulk refactoring across a project
:set incsearch hlsearch
The combination of incsearch and hlsearch gives you live, interactive search highlighting.
:split
The :split command (or s) splits the current window horizontally, creating a new window above with the same file.
:g/pattern/normal A;
The :global command combined with :normal lets you execute arbitrary normal mode keystrokes on every line that matches a pattern.
command-line #global #normal-mode #editing #ex-commands #batch-editing
va"
Vim's text objects let you select structured regions of text with two-keystroke shortcuts.
:%s//new/g
Leaving the search field empty in a :s command tells Vim to reuse the last search pattern from / or .
search #search #substitution #ex-commands #regex #productivity
:pop or <C-t>
When you jump to a tag definition with , Vim pushes your location onto a tag stack.
:&&
After running a :s/pattern/replacement/g command, you often need to repeat it on another line or range.
:verbose set option?
The :verbose prefix shows where an option was last set (which file, which line).
:let @q = '{keystrokes}'
You can assign a string directly to any register using :let @{reg} = '.
:s/,/,\r/g
In Vim's :substitute command, \r in the replacement string inserts a literal newline — it splits the line at that point.
:g/pattern/d
The :g/pattern/d command deletes every line in the file that matches the given pattern.
:'<,'>norm @a
Combining :normal with a visual range lets you replay a macro on each line of a selection individually — far more targeted than recursive macros or @@ repeati
O (visual block mode)
In visual block mode (), pressing O (uppercase) moves your cursor to the other end of the current line — letting you expand or contract the block's horizontal
:sb {buffer}
The :sb (short for :sbuffer) command opens a buffer that is already loaded in Vim in a new horizontal split window.
:tselect
When a tag has multiple definitions (e.