I usually used `code .` command to open a folder using Visual Studio Code, however it open as new Window.
So, I used folder open dialog to open a folder by current Window. GUI is useful. But I sometime had felt that I don't want to leave terminal window.
I checked a following document. I found -r option and --add option!!
-r option is to open a folder by current window, --add option is to add a folder to current work space.
If I would like to add two folders to Visual Studio Code, the folder names are 'sample1' and 'sample2', and initialize as git repositories.
I just type following command:
$ mkdir sample1 $ cd sample1 $ git init $ code -r . $ cd .. $ mkdir sample2 $ cd sample2 $ git init $ code --add .
What's a useful feature!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.