VSCode 工作空間 一個窗口打開多個項目 Add Folder to Workspace 快捷鍵

  • 其實你只需要看下面這兩行
    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": {}
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章