在 Win7 右鍵選單新增「以 Sublime Text 開啟檔案」
如圖所示,可在 Win7 右鍵選單新增「以 Sublime Text 開啟檔案(Open with Sublime Text)」與「開啟資料夾為專案(pen Folder as Sublime Project)」。這個方法用在 portable 版也可。
新增方法:
複製以下內容到 Sublime Text 或任何文字編輯軟體,將內文的 Sublime Text 軟體路徑修改為自己電腦上正確的安裝路徑,儲存成附檔名為「.reg」的檔案,例如「sublimeText_ContextMenu.reg」:
Windows Registry Editor Version 5.00 ; 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\sublime] @="Open Folder as Sublime Project" "Icon"="\"C:\\Program Files\\Sublime Text 2\\sublime_text.exe\",0" [HKEY_CLASSES_ROOT\Directory\shell\sublime\command] @="\"C:\\Program Files\\Sublime Text 2\\sublime_text.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\sublime] @="Open Folder as Sublime Project" "Icon"="\"C:\\Program Files\\Sublime Text 2\\sublime_text.exe\",0" [HKEY_CLASSES_ROOT\Directory\Background\shell\sublime\command] @="\"C:\\Program Files\\Sublime Text 2\\sublime_text.exe\" \"%V\"" ; Notepadd++ like open with sublimeText2 [HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text] @="Open with Sublime Text" "Icon"="\"C:\\Program Files\\Sublime Text 2\\sublime_text.exe\",0" [HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command] @="\"C:\\Program Files\\Sublime Text 2\\sublime_text.exe\" \"%1\""
到儲存檔案的資料夾,左鍵雙擊剛剛的「.reg」檔,出現警告視窗時點擊「是」,完成。
資料來源:https://gist.github.com/iaian/5265136










