Escape to a shell
Example
Normal 0 / 3Command-line 1 / 3Waiting for shell 2 / 3Normal 3 / 3Escape to a shell.
Terminal process
- Foreground
Vim- Vim
running- autowrite
off- autowriteall
off
Command entered · ready to apply
Terminal process
- Foreground
Vim- Vim
running- autowrite
off- autowriteall
off
Temporarily starts an interactive shell; Vim resumes after that shell exits.
Terminal process
- Foreground
child interactive shell- Vim
waiting for child shell
Shell
$
The shell exits and Vim resumes.
Terminal process
- Foreground
Vim- Vim
running- autowrite
off- autowriteall
off
Shell
$ exit
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.
notesCursor on line 1, column 1Details & 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.