How do I refer to all files in the argument list at once in an Ex command?
##
The ## special token expands to the names of all files currently in Vim's argument list.
795 results for "g* g#"
##
The ## special token expands to the names of all files currently in Vim's argument list.
:put =strtrans(@q)<CR>
Macro failures are often caused by hidden control keys like , , or tabs that are hard to see in raw register output.
\%l and \%c
Vim's \%l and \%c pattern atoms anchor a search to a particular line number or column, enabling surgical searches and substitutions that standard regex cannot e
\C
Vim's \C and \c atoms let you override ignorecase and smartcase on a per-pattern basis.
:put =getreg('a', 1, 1)
Most register pastes are character-oriented, but advanced edits often need to preserve exact line structure.
registers #registers #ex-commands #scripting #text-processing
guu / gUU
Vim's case operators gu (lowercase) and gU (uppercase) follow the same doubling convention as dd and yy: repeating the operator letter applies it to the whole c
:keeppattern {cmd}
Many Ex commands silently overwrite the search register (@/), which changes your hlsearch highlighting and n/N behavior.
\@<= and \@<!
Vim's \@<= and \@<! atoms let you write zero-width lookbehind assertions — they check what comes before the match position without consuming characters.
:set nrformats+=bin
Vim's and commands increment and decrement numbers under the cursor, but by default they only handle decimal and hexadecimal.
:'<,'>norm! A;
The :normal Ex command lets you execute any Normal mode keystrokes on a range of lines simultaneously, turning a single-line operation into a multi-line batch e
editing #editing #normal-mode #ex-commands #visual-mode #text-manipulation
:history :
When you work with long substitution pipelines or multi-part Ex commands, digging through all history (:history) adds noise.
:cgetexpr systemlist('rg --vimgrep TODO')
When you already have a shell command that emits file:line:col:message records, :cgetexpr is a fast way to populate quickfix directly.
K
Pressing K in normal mode runs a lookup program on the word under the cursor.
navigation #navigation #help #documentation #normal-mode #keywordprg
:tabmove +1
:tabmove normally takes an absolute position (:tabmove 0 moves the tab to the far left), but it also accepts relative offsets using + and -.
cr{s/m/c/k/u}
The vim-abolish plugin provides cr{type} coercions that instantly convert the word under the cursor to a different naming convention.
zG
zG marks the word under the cursor as correctly spelled in Vim's internal word list, which exists only for the current session.
:let @a = "value"
The :let @{reg} = expr command lets you assign any string or expression directly into a named register without entering insert mode or performing a yank.
:file {newname}
:file {newname} (short form: :f {newname}) changes the filename Vim associates with the current buffer.
\_.
In Vim's regular expressions, .
:s/^/\=line('.') - line("'<") + 1 . '. '/
When you need to quickly number a set of lines — such as TODO items, steps, or bullet points — you can use a visual selection combined with a substitution e
visual-mode #visual-mode #editing #ex-commands #formatting #substitute