VS Code Terminal and CLI/Wait until editor closes

Useful from Git commit editors and automation scripts.

Section: `code` CLI Basics

Wait until editor closes

bash
bash
code --wait path/to/file.txt

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing `code` CLI Basics
Show VS Code CLI help
Display usage and options.
OpenIn sheetbashsame section
Open in a new window
Launch a folder in a separate VS Code window.
OpenIn sheetbashsame section
Reuse current window
Open in the current window instead of creating a new one.
OpenIn sheetbashsame section
Open multiple files or folders
Pass many paths to VS Code.
OpenIn sheetbashsame section
Start with extensions disabled
Helpful for troubleshooting extension issues.
OpenIn sheetbashsame section
Install an extension from the CLI
Add an extension by identifier.
OpenIn sheetbash1 tag match