1. 程式人生 > >將sublime新增到右鍵選單

將sublime新增到右鍵選單

把以下程式碼,複製到SublimeText3的安裝目錄,然後重新命名為:sublime_addright.inf,然後右擊安裝就可以了。

PS:需要顯示副檔名才能真正改為inf檔案。

[Version]
Signature="$Windows NT$"

[DefaultInstall]
AddReg=SublimeText3

[SublimeText3]
hkcr,"*\\shell\\SublimeText3",,,"用 SublimeText3 開啟"
hkcr,"*\\shell\\SublimeText3\\command",,,"""%1%\sublime_text.exe"
" ""%%1"" %%*" hkcr,"Directory\shell\SublimeText3",,,"用 SublimeText3 開啟" hkcr,"*\\shell\\SublimeText3","Icon",0x20000,"%1%\sublime_text.exe, 0" hkcr,"Directory\shell\SublimeText3\command",,,"""%1%\sublime_text.exe"" ""%%1"""

方法二、

把以下程式碼,複製到SublimeText3的安裝目錄,然後重新命名為:sublime_addright.reg,然後雙擊就可以了。

PS:需要把裡邊的Sublime的安裝目錄,替換成實際的Sublime安裝目錄。

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\SublimeText3]
@="用 SublimeText3 開啟"
"Icon"="D:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"

[HKEY_CLASSES_ROOT\*\shell\SublimeText3\command]
@="D:\\Program Files\\Sublime Text 3\\sublime_text.exe %1"


[HKEY_CLASSES_ROOT\Directory
\shell\SublimeText3] @="用 SublimeText3 開啟" "Icon"="D:\\Program Files\\Sublime Text 3\\sublime_text.exe,0" [HKEY_CLASSES_ROOT\Directory\shell\SublimeText3\command] @="D:\\Program Files\\Sublime Text 3\\sublime_text.exe %1"

刪除右鍵選單的指令碼

把以下程式碼,複製到SublimeText3的安裝目錄,然後重新命名為:sublime_delright.reg,然後雙擊就可以了。

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shell\SublimeText3]
[-HKEY_CLASSES_ROOT\Directory\shell\SublimeText3]