Vim Recall繁體中文

Display a history list

:history

Example

Normal 0 / 3

Display a history list.

Command history

1
echo 1
2
echo 2

Command output

Empty
Before & after

Before

Command history

1
echo 1
2
echo 2

Command output

Empty

After

Command history

1
echo 1
2
echo 2
3
history cmd

Command output

#  cmd history
      1  echo 1
      2  echo 2
>     3  history cmd

Start in Normal mode. Prepared terminal: 80 columns by 24 rows, cmdheight=1 and nomore. Submit the command with the first Enter; output waits at hit-enter. Press the second Enter to acknowledge and return to Normal mode.

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

Example replayed in Vim

Display a history list. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :his[tory] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.