Vim Recall繁體中文

Escape to a shell

:shell

Example

Normal 0 / 3

Escape to a shell.

Terminal process

Foreground
Vim
Vim
running
autowrite
off
autowriteall
off
Before & after

Before

Terminal process

Foreground
Vim
Vim
running
autowrite
off
autowriteall
off

After

Terminal process

Foreground
Vim
Vim
running
autowrite
off
autowriteall
off

Shell

$ exit

Subject: :shell. Documentation-backed illustration; assumes Unix terminal, no GUI, both autowrite and autowriteall off, and shell set to a working interactive shell; shell state is simulated and prompts are schematic; not replay-verified. Temporarily starts an interactive shell; Vim resumes after that shell exits.

Sample buffer
notes
Cursor on line 1, column 1
Details & Vim help

Escape to a shell. 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 :sh[ell] 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.