鼠標右鍵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