How do I create a mapping that calls a script-local function in Vim without namespace collisions?
<SID>
(Script ID) is a Vimscript token that expands to a unique, per-script prefix at runtime.
2277 results for "@a"
<SID>
(Script ID) is a Vimscript token that expands to a unique, per-script prefix at runtime.
:filter /pattern/ {command}
:filter /pattern/ {command} runs any Ex command but suppresses every output line that does not match the pattern.
:'<,'>s/pattern/replacement/g
When you make a visual selection and then type :, Vim automatically inserts ' as the range — the marks for the start and end of the last visual selection.
:diffget //2
When resolving Git merge conflicts with vim-fugitive, running :Gvdiffsplit! opens a 3-way split: your current branch (left), the working file with conflict mark
\_.\+
By default, .
:set nrformats=
The nrformats option controls which number formats (increment) and (decrement) recognize.
:diffget 2
When Vim's diff mode has three or more buffers open, :diffget (or do) without an argument is ambiguous — Vim cannot determine which buffer to pull from.
:Gedit HEAD~3:%
The vim-fugitive plugin lets you open any version of any file from your Git history directly in a Vim buffer using the :Gedit command.
:%s/\zsparseData\ze(/processData/g
Vim's \zs and \ze atoms let you include context in your search pattern without including that context in the replacement.
:'<,'>g/pattern/command
How it works The :g (global) command is one of Vim's most powerful features.
<C-v>jj$A;
Visual block mode normally selects a fixed-width column, which makes appending tricky when lines have different lengths.
:[range]g/pattern/command
The :global command accepts an optional line range prefix that restricts which lines it even considers matching.
:e %:r.html
In Vim's command line, % expands to the current buffer's filename.
command-line #ex-commands #command-line #buffers #navigation
"ayi(
Combining named registers with text object motions lets you precisely yank structured content — like function arguments, quoted strings, or bracketed expressi
<C-v>j$A;<Esc>
When lines have varying lengths, a normal visual block selection stops at the shortest line.
:tab sbuffer {bufnr}<CR>
If a file is already loaded as a buffer, reopening it with :tabedit can trigger another read and may lose the exact in-memory context you want.
:sort r /\w\+$/
The :sort r /{pattern}/ command sorts lines using the text that matches the pattern as the sort key.
v3aw
In visual mode, repeating text object motions progressively expands the selection.
:for i in range(1,10) | execute "normal @q" | endfor
Using a Vimscript :for loop with execute "normal @q" lets you run a macro with a dynamically computed iteration count and interleave other Ex commands between i
/pattern/e+2
Vim's search command supports an offset suffix that controls where the cursor lands after a match.