-
其實你只需要看下面這兩行
Ctrl+J
調出Terminal
面板
code -a 目錄名
這一步相當於File
–>Add Folder to Workspace...
。
目錄名可以是絕對路徑、相對路徑、或.
和..
都可以。 -
查看VSCode的選項。其中
-a
相當於--add
E:\web\test-express>code --help
Visual Studio Code 1.45.1
Usage: code.exe [options][paths...]
To read output from another program, append '-' (e.g. 'echo Hello World | code.exe -')
Options
-d --diff <file> <file> Compare two files with each other.
-a --add <folder> Add folder(s) to the last active window.
-g --goto <file:line[:character]> Open a file at the path on the specified
line and character position.
-n --new-window Force to open a new window.
-r --reuse-window Force to open a file or folder in an
already opened window.
另:
- VSCode的工作空間的配置文件
xxx.code-workspace
{
"folders": [
{
"path": "E:\\web\\static-server"
},
{
"path": "E:\\web\\test-express"
}
],
"settings": {}
}