我最近安装了 Visual Studio Code 只是为了在我和朋友一起做项目时在我的笔记本电脑上做点什么,我一直想知道如何为文件夹设置一个默认目录。每次打开编辑器都要设置文件夹,有点烦人。
autohotkey 可以提供帮助
为此添加热键
vscode_wf:= "C:\Users\noway\AppData\Local\Programs\Microsoft VS Code\code.exe"
Run, %vscode_wf% "D:\markdown_folder", ,Max
这里是 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”,在“C:\Users\oldman \C#\ASP.MVC").