Created
August 5, 2015 20:25
-
-
Save Idered/7274e64ff01176197bc2 to your computer and use it in GitHub Desktop.
Add "Open with Sublime Text" command to file, folder and inside directory context menu.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET STPATH=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\sublime" /t REG_SZ /v "" /d "Open with Sublime Text" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\sublime" /t REG_EXPAND_SZ /v "Icon" /d "%STPATH%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\sublime\command" /t REG_SZ /v "" /d "%STPATH% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\sublime" /t REG_SZ /v "" /d "Open with Sublime Text" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\sublime" /t REG_EXPAND_SZ /v "Icon" /d "%STPATH%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\sublime\command" /t REG_SZ /v "" /d "%STPATH% \"%%1\"" /f | |
rem add it for directory | |
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\sublime" /t REG_SZ /v "" /d "Open with Sublime Text" /f | |
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\sublime" /t REG_EXPAND_SZ /v "Icon" /d "%STPATH%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\sublime\command" /t REG_SZ /v "" /d "%STPATH% \"%%V\"" /f | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment