Changing the default path of Visual Studio Code's integrated terminal

后端 未结 6 506
不知归路
不知归路 2020-12-24 13:07

I\'m trying to change the default path of the integrated terminal in Visual Studio Code, but I\'m not sure how to. I do know how to change it in the windows command prompt,

6条回答
  •  自闭症患者
    2020-12-24 13:45

    You can also set it to a relative path to the open folder with

    "terminal.integrated.cwd": "./example"
    

    So if you do menu FileOpen Folder... → project, and open the terminal with your keyboard shortcut, it will open to ~/project/example automatically.

    It can be a general folder like src you would always use, or a specific one (but then it would be best to save it in file .vscode/settings.json).

提交回复
热议问题