Home > Software design >  Open file in specific Visual Studio Code window from external terminal
Open file in specific Visual Studio Code window from external terminal

Time:12-12

If the user has multiple Visual Studio Code windows open, is there a way to open a file from an external terminal in a specific window?

I know one can just do code <file> to open a file in the last active window. I am wondering if there is a way to open it in a specific window (perhaps using the workspace name).

CodePudding user response:

Use the -n or --new- option in the terminal

code -n <file>

Or

code --new-window <file>

edit: code -h gives you a list of possible commands

CodePudding user response:

enter image description here

  • Related