tor*_*yan 7 visual-studio-code
是否可以在 Visual Studio Code 中更改新集成终端窗口的工作目录?
我已在代码中打开该文件夹/path/to/project,因此当我打开新的终端窗口时,它会在该文件夹中启动。我希望打开终端,/path/to/project/app这样我就不必每次都cd到该文件夹。可以在 中配置吗settings.json?
tor*_*yan 10
事实证明,这很容易在https://code.visualstudio.com/docs/getstarted/settings的文档中找到。
控制这个的设置是
  // An explicit start path where the terminal will be launched, this is used
as the current working directory (cwd) for the shell process. This may be
particularly useful in workspace settings if the root directory is not a convenient cwd.
  "terminal.integrated.cwd": "",
这可以添加到文件夹settings.json中.vscode。支持绝对路径和相对路径,因此
"terminal.integrated.cwd": "app"
和
"terminal.integrated.cwd": "/path/to/project/app"
两者都会起作用。
| 归档时间: | 
 | 
| 查看次数: | 12052 次 | 
| 最近记录: |