Home > OS >  in vscode, can I open a directory in the current window via the terminal/cli
in vscode, can I open a directory in the current window via the terminal/cli

Time:10-02

As per the title

If I go to the VSCode terminal and type code <name of dir>, it opens the directory in a new VSCode window. I wish there was a way to open it in the current window (perhaps using another command, or choosing some option in preferences)

Is there?

CodePudding user response:

There is a setting not for the command line but for opening a folder from a menu or command:

Window: Open Folders in New Window // set to 'off'

or use the -r switch (for 'reuse the same window) in the command line, see Command Line options

CodePudding user response:

You can use ctrl K O and select a folder to open.

  • Related