VSCode 工作空间 一个窗口打开多个项目 Add Folder to Workspace 快捷键

巫煌
2023-12-01
  • 其实你只需要看下面这两行
    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": {}
}
 类似资料: