I know this is an older post, but I figured I would offer up my findings just in case someone stumbles upon it. These instructions are for a computer running Windows 7. It may be similar for other versions of Windows as well.
From my quick research, to add SublimeText to the right-click menu when you right-click on a folder (as opposed to a file) you should follow the directions from the link that adzenith provided. However, rather than entering sublime_text.exe %1 you should enter sublime_text.exe %V. Or maybe in addition to entering sublime_text.exe %1 you should repeat the process but enter sublime_text.exe %V on your second time through. It is my understanding that sublime_text.exe %1 will allow you to open a file in SublimeText, whereas sublime_text.exe %V will allow you to open a folder in SublimeText. I could be wrong.
Another resource that I found recommended writing your own registry file that would add SublimeText to the right-click menu.
-
Create a new text document on your desktop (it doesn’t actually matter where you create the document). I named my document add-ST3-to-right-click-menu.reg
, but the name is not important as long as it ends in .reg.
-
Open the file you just created in SublimeText and copy the code below and paste it into your document. Do not remove the empty lines - these are important. Also, a semicolon at the beginning of a line acts as a comment. Anything written on the same line that has a semicolon at the beginning of it will not be read by the computer when running the file.
-
If necessary
, edit the location of sublime-text.exe if it is in a different location than specified in the code below (“C:\Program Files\Sublime Text 3\sublime_text.exe”).
-
After you are certain that all of the locations and file/folder names are correct, save the document and quit SublimeText.
-
Browse to the location of your document and double-click it. This should add SublimeText to your right-click menu when you right-click on a folder.
-
It may be necessary to log-off and log-in again or restart your computer in order for the registry to properly update.
***** WARNING* **** - This file updates your computer’s registry. If you do not know what you are doing and you do not feel comfortable running such a task, do NOT attempt this. I am not responsible for any damage that you may do to your computer if you do not know what you are doing.
[code]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 3\sublime_text.exe”,0"
[HKEY_CLASSES_ROOT\Directory\shell\sublime\command]
@="“C:\Program Files\Sublime Text 3\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 3\sublime_text.exe”,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\sublime\command]
@="“C:\Program Files\Sublime Text 3\sublime_text.exe” “%V”"[/code]
***** NOTE* **** - I have not been able to test my findings because I do not have permissions to edit the registry files that are necessary on my business computer to make this work.
I hope this helps someone. Feedback as to whether or not this works or how you edited the process or code to make it to work would be appreciated. Good luck!