VS Code Terminal and CLI/Reuse current window

Open in the current window instead of creating a new one.

Section: `code` CLI Basics

Reuse current window

bash
bash
code -r .

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
Open in a new window
Launch a folder in a separate VS Code window.
OpenIn sheetbashsame section
Show VS Code CLI help
Display usage and options.
OpenIn sheetbashsame section
Open multiple files or folders
Pass many paths to VS Code.
OpenIn sheetbashsame section
Wait until editor closes
Useful from Git commit editors and automation scripts.
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