VSCodeTips

VSCodeTips is a community of amazing vscoders

We're a community that shares tips & tricks on how to best leverage VS Code

Create account Log in
Cover image for April 4th, 2022: VS Code Tip of the Week
Nick Taylor
Nick Taylor

Posted on • Updated on

April 4th, 2022: VS Code Tip of the Week

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.

All you nee to do is add the -r flag to reuse the window, e.g.

code -r ./some-folder
Enter fullscreen mode Exit fullscreen mode

or

code ./some-folder -r
Enter fullscreen mode Exit fullscreen mode

The same goes for individual files.

code -r ./some-file.ext
Enter fullscreen mode Exit fullscreen mode

or

code ./some-file.ext -r
Enter fullscreen mode Exit fullscreen mode

Happy VS Coding!

Discussion (0)