Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
    
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"

share|improve this answer

If paths contain spaces, they must be escaped:

"C:\Program Files\Sublime Text 2\sublime_text.exe" "%1"
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .