user310291
user310291

Reputation: 38180

vscode command line : open a file of an opened project

I have a project opened in vscode.

I Windows Powershell, under project directory, when I type

code test.html

It will open the file but with a new vscode instance, I want in the already opened project instead : is it possible ?

Upvotes: 2

Views: 212

Answers (1)

kaffarell
kaffarell

Reputation: 709

Yes, it is possible with the -r (--reuse-window) option.
For example:

code -r .\Dockerfile

(https://code.visualstudio.com/docs/editor/command-line)

Upvotes: 2

Related Questions