Skip to content

Instantly share code, notes, and snippets.

@iaian
Last active January 15, 2019 15:46
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save iaian/5265136 to your computer and use it in GitHub Desktop.
Save iaian/5265136 to your computer and use it in GitHub Desktop.
Add SublimeText 2 context menu to windows explorer. If item is folder, context menu has option "open in sublimetext project". If is file, "open in sublime text 2" option is added to context menu. Tested on windows 7
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 2]
@="Open with Sublime Text 2"
"Icon"="\"C:\\Program Files\\Sublime Text 2\\sublime_text.exe\",0"
[HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command]
@="\"C:\\Program Files\\Sublime Text 2\\sublime_text.exe\" \"%1\""
@MCalder423
Copy link

Sweet!! That's exactly what I was looking for. I'm surprised that ST doesn't include something like this in the setup process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment