代码之家  ›  专栏  ›  技术社区  ›  Yashu Mittal

如何通过右键单击文件夹在新vs代码实例中打开文件夹?

  •  2
  • Yashu Mittal  · 技术社区  · 8 年前

    例如 :A和B

    enter image description here

    甚至Atom也可以选择在新实例中打开文件夹。

    enter image description here

    2 回复  |  直到 8 年前
        1
  •  16
  •   Dan    8 年前

    此扩展允许您在新的vscode窗口中打开文件夹。
    Open Folder Context Menus for VS Code

        2
  •  10
  •   katsho    8 年前

    或“window.openfolderwWindow”设置:

    // Controls if folders should open in a new window or replace the last active window.
    // - default: folders will open in a new window unless a folder is picked from within the application (e.g. via the File menu)
    // - on: folders will open in a new window
    // - off: folders will replace the last active window
    // Note that there can still be cases where this setting is ignored (e.g. when using the -new-window or -reuse-window command line option).
    "window.openFoldersInNewWindow": "default",
    
        3
  •  7
  •   Manish S    7 年前

    创建注册表文件,例如OpenOnRightClick.reg

    Windows Registry Editor Version 5.00
    ; Open files
    [HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
    @="Edit with VS Code"
    "Icon"="C:\\Users\\xx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0"
    [HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
    @="\"C:\\Users\\xx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
    ; This will make it appear when you right click ON a folder
    ; The "Icon" line can be removed if you don't want the icon to appear
    [HKEY_CLASSES_ROOT\Directory\shell\vscode]
    @="Open Folder as VS Code Project"
    "Icon"="\"C:\\Users\\xx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0"
    [HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
    @="\"C:\\Users\\xx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
    ; This will make it appear when you right click INSIDE a folder
    ; The "Icon" line can be removed if you don't want the icon to appear
    [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
    @="Open Folder as VS Code Project"
    "Icon"="\"C:\\Users\\xx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0"
    [HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
    @="\"C:\\Users\\xx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
    

    根据安装目录更改visual studio代码的位置 现在只需双击OpenOnRightClick.reg文件,如果需要,请确认!

        4
  •  6
  •   Amar Singh Bharat Patel    5 年前

    让我们把它变得非常简单

    enter image description here

    1. 拖动项目文件夹并将其放到vscode中。如下图所示

    enter image description here

    就这样。新建空白窗口已打开新项目。

    下面讨论另一种方法

    1. vscode . 在文件位置上,键入URL cmd
    2. 在cmd提示符中,键入 code .
    3. 您的文件夹将在新文件夹中打开 窗