【问题标题】:Visual Studio Code Default FolderVisual Studio Code 默认文件夹
【发布时间】:2018-03-07 06:33:54
【问题描述】:

我最近安装了 Visual Studio Code,以便在我与朋友一起处理项目时在我的笔记本电脑上进行润色,我一直想知道如何为文件夹设置默认目录。每次打开编辑器时都必须设置文件夹,这有点烦人。

【问题讨论】:

标签: visual-studio-code settings


【解决方案1】:

自动热键可以帮助

为此添加热键

vscode_wf:= "C:\Users\noway\AppData\Local\Programs\Microsoft VS Code\code.exe"
Run, %vscode_wf% "D:\markdown_folder", ,Max

【讨论】:

    【解决方案2】:

    这是 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")。

    【讨论】:

    • 这个答案引用了在 VS Code 中运行终端,这与打开默认文件夹不同。
    【解决方案3】:

    还有另一篇文章讨论了上一个问题中的设置:Default Folder

    【讨论】:

      猜你喜欢
      • 2022-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-14
      • 2021-06-30
      相关资源
      最近更新 更多