Display a history list
Example
Normal 0 / 3Command-line 1 / 3Hit-enter prompt 2 / 3Normal 3 / 3Display a history list.
Command history
- 1
echo 1- 2
echo 2
Command output
Empty
Command entered · ready to apply
Command history
- 1
echo 1- 2
echo 2
Command output
Empty
Command submitted · output shown · press Enter to acknowledge
Command history
- 1
echo 1- 2
echo 2- 3
history cmd
Command output
# cmd history
1 echo 1
2 echo 2
> 3 history cmdOutput acknowledged · returned to Normal mode
Command history
- 1
echo 1- 2
echo 2- 3
history cmd
Command output
# cmd history
1 echo 1
2 echo 2
> 3 history cmdBefore & 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 cmdStart 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.
one two
three four
five six
keepCursor on line 1, column 1Details & 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.