Visual studio code 如何通过右键单击文件夹在新vs代码实例中打开文件夹?
我在VS代码实例中打开了两个文件夹 例如(文件夹名称):A和B 我想在VS代码的新实例中打开文件夹B,但右键单击该文件夹无法打开该文件夹 甚至Atom也可以选择在新实例中打开文件夹Visual studio code 如何通过右键单击文件夹在新vs代码实例中打开文件夹?,visual-studio-code,Visual Studio Code,我在VS代码实例中打开了两个文件夹 例如(文件夹名称):A和B 我想在VS代码的新实例中打开文件夹B,但右键单击该文件夹无法打开该文件夹 甚至Atom也可以选择在新实例中打开文件夹 您可以通过文件>新建窗口或ctrl+shift+n打开新窗口,然后在那里打开第二个文件夹 或“window.openfolderwWindow”设置: 此扩展允许您在新的vscode窗口中打开文件夹。 让我们把它变得非常简单 在vscode中,转到文件-->新建窗口,如下图所示。这将打开一个空白的vscode窗口,
您可以通过文件>新建窗口或ctrl+shift+n打开新窗口,然后在那里打开第二个文件夹 或“window.openfolderwWindow”设置:
此扩展允许您在新的vscode窗口中打开文件夹。
让我们把它变得非常简单
vscode
中打开的文件夹URL。在文件位置上,键入URLcmd
code.
vscode
窗口中打开创建注册表文件,例如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文件,如果需要,请确认!
全部完成!在您右键单击时,您将有一个“用代码打开”选项。此答案与我所问的问题无关。谢谢,这对我很有用。我通过按
cmd+,
并在新窗口中搜索打开的文件夹找到了该选项。我在
上将其设置为,现在工作正常。相关帖子-如果所有其他功能都失败,希望有一个扩展来解决差距/问题。谢谢分享!祝福你分享的心。
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\""