How do I paste from a register in the command line?
<C-r>{reg} in command line
While on the : command line, pressing followed by a register name inserts that register's contents.
640 results for "/pattern"
<C-r>{reg} in command line
While on the : command line, pressing followed by a register name inserts that register's contents.
:'<,'>normal @q
The :'normal @q command runs macro q on every line of the visual selection.
:%s/old/new/g
The :%s/old/new/g command replaces all occurrences of old with new across every line in the file.
<C-f> from : prompt
Pressing while on the : command line opens the command-line window, where you can edit your command using full Vim editing capabilities.
y/<C-r>"<CR>
To search for the exact text you have selected in visual mode, yank it and paste it into the search prompt.
f{vi{U
When editing structured text, you often need to transform content inside delimiters without touching the delimiters themselves.
/\%5l\%10cpattern
Vim provides position-matching atoms that constrain where a pattern can match based on line numbers, column positions, or virtual columns.
[on / ]on / yon
The vim-unimpaired plugin by Tim Pope provides a consistent set of bracket-based mappings for toggling Vim options, navigating paired lists, and performing comm
qa ci"replacement<Esc> /next<CR> q
Macros can contain any Vim command including text objects, searches, and multi-key motions.
:g/^\s*$/d
The global command :g/^\s$/d removes every line that is empty or contains only whitespace — a common cleanup task when tidying up code, configuration files, o
"=strftime('%Y-%m-%d %H:%M')<CR>p
The expression register lets you evaluate Vimscript on demand and paste the result immediately.
registers #registers #expression-register #automation #timestamps
:lockmarks normal! >>
When you run editing commands from the command line, Vim usually updates special marks like '[ and '] to the changed text.
g??
Vim has a built-in ROT13 operator g? that encodes text by rotating each letter 13 positions in the alphabet.
:g/^/normal I// <CR>
When you need to comment a whole block quickly, :global combined with :normal is faster than recording a macro or entering Visual Block mode.
cr
The vim-abolish plugin (by tpope) provides a cr (coerce) operator that converts the word under the cursor between naming conventions with a single keystroke pai
:%s/\v(old)/\=toupper(submatch(0)[0]).tolower(submatch(0)[1:])/g
Standard substitutions don't preserve the original case of matched text.
:set inccommand=split
Neovim's inccommand option provides real-time visual feedback as you type substitution commands.
:'<,'>normal! A;
Visual selections are not just for direct operators; they also define an Ex range.
visual-mode #visual-mode #normal-mode #editing #ex-commands #automation
:%norm A;
The :%norm command runs normal mode commands on every line in the file (or a range).
:lfdo normal! @q | update
When you already have a curated location list, :lfdo lets you apply a change only to those files instead of touching your whole project.
macros #macros #location-list #refactoring #command-line #normal-mode