鼠标右键vsCode打开


一直苦恼vscode怎么没有右键打开文件夹的功能,原来是因为当初安装时没有勾选这个配置项。
所幸可以通过手动增加注册表来实现。将下面的内容保存为一个“.reg”为后缀的文件后双击运行。

Windows Registry Editor Version 5.00 

; This will make it appear when you right click ON any file
; The "Icon" line can be removed if you don't want the icon to appear 
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code] 
@="Edit with VS Code" 
"Icon"="C:\\Users\\bobin.yang\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0" 

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] 
@="\"C:\\Users\\bobin.yang\\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 with VSCode" 
"Icon"="\"C:\\Users\\bobin.yang\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0" 

[HKEY_CLASSES_ROOT\Directory\shell\vscode\command] 
@="\"C:\\Users\\bobin.yang\\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 with VSCode" 
"Icon"="\"C:\\Users\\bobin.yang\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\",0" 

[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command] 
@="\"C:\\Users\\bobin.yang\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
C:\\Users\\bobin.yang\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0" 

[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] 
@="\"C:\\Users\\bobin.yang\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM