Vim Recall繁體中文

Ctrl-p · Command-line editing

Ctrl-p

Example

Command-line 0 / 1

After using 'wildchar' with multiple matches: go to previous match, otherwise: recall older command-line from history.

Command line

Prompt
:
Insertion column
1
Editing mode
Insert
Completion menu
inactive

Command history

1
echo 1
2
echo 2

Vim messages

Empty
Last status message
Last warning
Before & after

Before

Command line

Prompt
:
Insertion column
1
Editing mode
Insert
Completion menu
inactive

Command history

1
echo 1
2
echo 2

Vim messages

Empty
Last status message
Last warning

After

Command line

Prompt
:echo 2
Insertion column
7
Editing mode
Insert
Completion menu
inactive

Command history

1
echo 1
2
echo 2

Vim messages

Empty
Last status message
Last warning

Start in Command-line mode.

Sample buffer
one two
three four
five six
keep
Cursor on line 1, column 1
Details & Vim help

Example replayed in Vim

After using 'wildchar' with multiple matches: go to previous match, otherwise: recall older command-line from history.

After using 'wildchar' with multiple matches: go to previous match, otherwise: recall older command-line from history. 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.