給visual studio code加入右鍵菜單
背景
一開始安裝VScode的時候忘了將“將VScode加入郵件菜單”勾上,用了一段事件後發現右鍵菜單還是挺方便的,於是想把右鍵菜單加上,結果程序本身的設置裏沒找到,所以從網上找了教程,手動添加一下,寫這篇博客,記錄一下,以防日後出相同問題
解決方案
-
新建一個後綴爲
.reg
的文件,找一個編輯器打開, 直接將下面的註冊表內容複製 -
注意要根據自己的實際情況修改註冊表中所有的VScode的安裝目錄
-
然後安裝註冊表
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\liuso\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"C:\\Users\\liuso\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\liuso\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\shell\VSCode\command]
@="\"C:\\Users\\liuso\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode]
@="Open with Code"
"Icon"="C:\\Users\\liuso\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command]
@="\"C:\\Users\\liuso\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%V\""