I created a new entry in the registry at

HKEY_CLASSES_ROOT*\shell\Edit with Sublime Text 2\command

and the default key read

C:\Program Files\Sublime Text 2\sublime_text.exe %1

Now when I right click on a file and try to edit a file using this shortcut, I am greeted with the standard "Open With" dialog box for windows. I understand that I could associate the file with Sublime Text, but I want to be able to open any file with this shortcut and have Sublime Text open it.

Is there something that I'm doing wrong with this registry key?

  • Did you reboot or log out and back in? Windows doesn't reload the registry like you might expect. – lornix Jul 22 '13 at 10:05

Yes. You need to create another entry that will put the command into the context menu for files. Something like this:
[HKEY_CLASSES_ROOT\*\shell\Edit with Sublime Text 2]
@="&Edit with Sublime Text 2"


If paths contain spaces, they must be escaped:

"C:\Program Files\Sublime Text 2\sublime_text.exe" "%1"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.