VS Code Tip of the Week: Open a Project from the Shell into same VS Code Window
This week's tip is short and sweet.
My friend Chris on Twitter this week asked how do you open a project from a shell without opening another VS Code window.
How in the hell do you open a project in the current VS Code window from the integrated terminal w/o VS Code spinning up another instance?
— 🛸 👻 👣 Chris D. 🇺🇦 (@saltnburnem) March 30, 2022
All you nee to do is add the -r
flag to reuse the window, e.g.
code -r ./some-folder
or
code ./some-folder -r
The same goes for individual files.
code -r ./some-file.ext
or
code ./some-file.ext -r
Happy VS Coding!