How do I use look-behind assertions in Vim regex to match text only when preceded by a pattern?
\@<=
The \@<= operator is Vim's zero-width look-behind assertion.
170 results for ":help"
\@<=
The \@<= operator is Vim's zero-width look-behind assertion.
<C-r>= (command-line mode)
Just like = lets you insert evaluated expressions in insert mode, you can use it inside an Ex command on the command line to embed any Vimscript expression resu
Q
In Neovim, the Q key is mapped to replay the last executed macro — the same as @@ in both Vim and Neovim.
:{range}!command
The :{range}!command syntax pipes the specified lines through an external shell command and replaces them with the output.
command-line #command-line #shell #filtering #unix #ex-commands
:%TOhtml
Vim ships with a built-in plugin that converts the current buffer into a standalone HTML file, complete with your exact syntax highlighting colors.
:keepmarks %s/pattern/replacement/g
The :keepmarks modifier prevents Vim from adjusting mark positions when a buffer-modifying command runs.
:find {filename}
:find searches for a file in all directories listed in the path option and opens it in the current window.
:'<,'>s/\%Vold/new/g
The \%V atom restricts a search pattern to match only within the visual selection area, including visual block selections.
~/.vim/after/ftplugin/{filetype}.vim
Vim's after directory (~/.
"-p
The small delete register ("-) captures text from delete operations that are less than one line — like dw, x, dt.
g]
g] is the disambiguation-aware alternative to .
[m
The [m motion jumps backward to the start of the nearest enclosing or preceding method definition.
:mksession
:mksession saves a snapshot of the current Vim session — all open buffers, window splits, tab pages, cursor positions, and folds — to a file called Session.
:doautocmd FileType
When you change a buffer's filetype mid-session — say with :set filetype=python — Vim updates the filetype option but does not automatically re-run the File
[<C-d>
Vim's [ command jumps to the first definition of the macro or identifier under the cursor, searching from the beginning of the current file and through any file
<C-x><C-d>
in insert mode triggers defined identifier completion — it searches for identifiers that match the partial word before the cursor by scanning #define statemen
<C-r><C-o>"
The {register} sequence in insert mode pastes register contents literally — without triggering auto-indentation, abbreviations, or mappings.
o (in visual mode)
While in visual mode, pressing o swaps the cursor to the opposite end of the selection.
:set wildcharm=<Tab>
The wildcharm option designates a key that, when it appears inside a mapping, triggers wildmenu completion on the command line — just as if you had pressed in
set smoothscroll
By default, Neovim's half-page scroll commands (, , , ) count movement by text lines, not screen rows.