展示效果圖
Windows上面安裝Visual Studio Code編輯器后,常常會因為安裝的時候忘記勾選等原因,沒有將"Open with Code(右鍵快捷方式)"添加到鼠標右鍵菜單里,使用起來多有不便,所以需要我們手動將VSCode添加至鼠標右鍵菜單之中。
解決
1.新建reg文件.在桌面上新建一個文本文件,然后將文件后綴改為:*.reg,文件名任意,例如:add_shortcut.reg.
2.編寫文本文件內容.將下面的內容Copy到剛才新建的*.reg文件中,文本內容如下:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\VSCode] @="Open with Code" "Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe" [HKEY_CLASSES_ROOT\*\shell\VSCode\command] @="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\"" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\VSCode] @="Open with Code" "Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe" [HKEY_CLASSES_ROOT\Directory\shell\VSCode\command] @="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\"" Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode] @="Open with Code" "Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe" [HKEY_CLASSES_ROOT\Directory\Background\shell\VSCode\command] @="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
3.上面代碼中的地址表示VSCode在電腦上的安裝路徑,如果不是默認安裝的或者路徑不一樣,需要改成和電腦上實際安裝路徑一致的.
4.文件編輯好了之后保存關閉.然后雙擊運行 add_shortcut.reg ,遇到提示點擊 "確定"或"是".不出意外,便大功告成了!
原文鏈接:https://www.cnblogs.com/jswl/p/9935998.html
后續會陸續更新其他資料,喜歡請關注哦!
我的博客:https://www.cnblogs.com/duhaoran/