Skip to content

Instantly share code, notes, and snippets.

@kalvn
Last active March 22, 2017 15:05
Show Gist options
  • Save kalvn/3dd746691603b2686810474213e9b1a0 to your computer and use it in GitHub Desktop.
Save kalvn/3dd746691603b2686810474213e9b1a0 to your computer and use it in GitHub Desktop.
Adds Windows context menu entries for opening files and folders in Sublime Text. Be careful to adapt the path and to encode files in ANSI. Original post: https://forum.sublimetext.com/t/right-click-open-folder-with-sublime-text/13970/10
Windows Registry Editor Version 5.00
; For folders.
[HKEY_CLASSES_ROOT\Directory\shell\sublime]
@="Open folder with Sublime Text"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\sublime]
@="Open folder with Sublime Text"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%V\""
; For files.
[HKEY_CLASSES_ROOT\*\shell\sublime]
@="Open with Sublime Text"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\*\shell\sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\""
Windows Registry Editor Version 5.00
; For folders.
[-HKEY_CLASSES_ROOT\Directory\shell\sublime]
[-HKEY_CLASSES_ROOT\Directory\shell\sublime\command]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\sublime]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\sublime\command]
; For files.
[-HKEY_CLASSES_ROOT\*\shell\sublime]
[-HKEY_CLASSES_ROOT\*\shell\sublime\command]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment