Home > OS >  vscode command line : open a file of an opened project
vscode command line : open a file of an opened project

Time:12-06

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 ?

CodePudding user response:

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

code -r .\Dockerfile

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

  • Related