How do I run text I've yanked or typed as a Vim macro without recording it first?
@"
Vim macros are stored in registers — and you can execute any register as a macro with @{register}.
272 results for ":q!"
@"
Vim macros are stored in registers — and you can execute any register as a macro with @{register}.
:set formatoptions
The formatoptions setting is a string of single-character flags that governs Vim's automatic text formatting: when lines wrap, whether comment syntax continues
<C-v>jjjI
Visual block mode combined with I lets you insert the same text at the beginning of multiple lines simultaneously.
:s/pattern/replacement/e
The e flag in Vim's :substitute command silently ignores the "E486: Pattern not found" error when the pattern does not match anything.
qaqqa{actions}@aq@a
A recursive macro is a macro that calls itself at the end of its recording.
10@a
The 10@a command replays the macro recorded in register a exactly 10 times.
<C-v>
The (Ctrl+v) command enters visual block mode, which lets you select a rectangular column of text across multiple lines.
:bufdo normal @a
The :bufdo command executes an Ex command in every open buffer, and when combined with :normal @a, it replays macro a across all of them.
macros #macros #buffers #ex-commands #automation #productivity
:Git blame
The vim-fugitive plugin by Tim Pope provides a powerful interactive :Git blame that goes far beyond the basic command-line git blame.
:Gdiffsplit
The vim-fugitive plugin provides :Gdiffsplit (and its vertical variant :Gvdiffsplit) to open a side-by-side diff view comparing the working tree version of a fi
:enew | setlocal buftype=nofile bufhidden=wipe noswapfile
A scratch buffer is a temporary, unnamed buffer that exists only in memory — it won't prompt you to save when you close it and leaves no trace on disk.
buffers-windows #buffers #editing #ex-commands #productivity #workflow
ciw""<Esc>P
Vim doesn't have a built-in "surround" operator, but you can wrap any word in quotes or brackets with a short sequence: ciw""P.
editing #editing #text-objects #normal-mode #productivity #surround