Vim Recall繁體中文

Previous match when 'incsearch' is active

Ctrl-t

Example

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

Previous match when 'incsearch' is active.

Command line

Typed text
/red
Insertion offset
4

Incremental search

incsearch
on
Current match
second red
Before & after
Before
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
After
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

Documentation-backed illustration. incsearch is on and the current /red preview is already displayed (c_CTRL-G/c_CTRL-T). CTRL-T previews the previous 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-T.

Details & Vim help

Previous 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.