重複上一個 :! 指令
:!!
範例
一般模式 0 / 3命令列模式 1 / 3等待輸入字元 2 / 3一般模式 3 / 3重複上一個 :! 指令。
Shell 內容
- shell
/bin/sh- 上一個外部指令
printf hello
外部輸出
- stdout
指令已輸入。按 Enter 執行。
Shell 內容
- shell
/bin/sh- 上一個外部指令
printf hello
外部輸出
- stdout
命令列
- 輸入的文字
:!!- 插入偏移量
3
預備的外殼指令已印出 hello。Vim 正在等待外殼回傳的確認。
Shell 內容
- shell
/bin/sh- 已執行指令
printf hello
外部輸出
- stdout
hello
Shell 回傳提示
- 提示
Press ENTER or type command to continue
shell 指令會輸出 hello,緩衝區文字保持原樣。:!! 重做上一次的外部指令。按 Enter 從外殼輸出畫面返回。
Shell 內容
- shell
/bin/sh- 已執行指令
printf hello
外部輸出
- stdout
hello
操作前後
操作前
Shell 內容
- shell
/bin/sh- 上一個外部指令
printf hello
外部輸出
- stdout
操作後
Shell 內容
- shell
/bin/sh- 已執行指令
printf hello
外部輸出
- stdout
hello
根據文件繪製。假設使用支援 printf 的 POSIX shell,允許執行外部指令,且有畫面所示的指令歷史(:! 和 :!!)。此處只顯示範例資料。shell 指令會輸出 hello,緩衝區文字保持原樣。:!! 重做上一次的外部指令。主要說明::!!。
alpha
beta
gamma游標位於第 1 行,第 1 欄