Vim Recall繁體中文

Next match when 'incsearch' is active

Ctrl-g

Example

Command-line 0 / 1
red blue red
Cursor on line 1, column 1

Next match when 'incsearch' is active.

Command line

Typed text
/red
Insertion offset
4

Incremental search

incsearch
on
Current match
first red
Before & after
Before
red blue red
Cursor on line 1, column 1

Command line

Typed text
/red
Insertion offset
4

Incremental search

incsearch
on
Current match
first red
After
red blue red
Cursor on line 1, column 10

Command line

Typed text
/red
Insertion offset
4

Incremental search

incsearch
on
Current match
second red

Documentation-backed illustration. incsearch is on and the current /red preview is already displayed (c_CTRL-G/c_CTRL-T). CTRL-G previews the next red match while /red is still being entered. Buffer cursor markers identify the selected preview match starts; they do not represent Vim's internal cursor position while the command line is active. Primary help: c_CTRL-G.

Details & Vim help

Next match when 'incsearch' is active. Use while editing a : command or / or ? search prompt; this edits or controls that prompt rather than running an Ex command. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.