Reputation: 1488
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?
Upvotes: 14
Views: 8353
Reputation: 182821
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
code -r <folder-name>
Upvotes: 28
Reputation: 190
Very old question but I've just started using VS Code and found that "code -r ." did the trick. Hope this helps someone out.
Upvotes: 1