Vim Recall繁體中文

Repeat last ":!" command

:!!

Example

Normal 0 / 3

Repeat last ":!" command.

Shell context

shell
/bin/sh
Previous external command
printf hello

External output

stdout
Before & after

Before

Shell context

shell
/bin/sh
Previous external command
printf hello

External output

stdout

After

Shell context

shell
/bin/sh
Executed command
printf hello

External output

stdout
hello

Documentation-backed illustration. a POSIX shell with printf, unrestricted shell commands, and the shown command history (:!/:!!); this is data only. The shell command prints hello while the editing buffer stays unchanged. :!! repeats the prepared previous external command. Primary help: :!!.

Sample buffer
alpha
beta
gamma
Cursor on line 1, column 1
Details & Vim help

Repeat last ":!" command. 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. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.