我最近安装了Visual Studio Code,只是为了在与朋友合作项目时随手处理文件,但我一直想知道如何设置默认目录。每次打开编辑器都要设置文件夹有点烦人。
我最近安装了Visual Studio Code,只是为了在与朋友合作项目时随手处理文件,但我一直想知道如何设置默认目录。每次打开编辑器都要设置文件夹有点烦人。
这是 VS Code 的提示:
// 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": ""
例如在Gnu-Linux/Unix系统中:
"terminal.integrated.cwd": "/home/oldman/C#/ASP.MVC"
在Windows上
"terminal.integrated.cwd": "C:\Users\oldman\C#\ASP.MVC"
您的终端将被设置为当前工作目录(cwd)作为资源管理器中的根目录,(在Linux上为“/home/oldman/C#/ASP.MVC”,在Windows上为“C:\Users\oldman\C#\ASP.MVC”)。
Autohotkey可以帮助你
添加一个热键到这里
vscode_wf:= "C:\Users\noway\AppData\Local\Programs\Microsoft VS Code\code.exe"
Run, %vscode_wf% "D:\markdown_folder", ,Max
我不确定我是否正确理解了问题,但以下是我的想法。
"window.restoreWindows": "all"
希望这可以帮助您。
打开你的VS Code快捷方式,右键点击它,然后选择“属性”。
在VS Code路径后面,插入你的文件夹路径。
下面是上述指令的图片说明: