Add “Open with Sublime Text 3” to Windows Explorer Context Menu

If you are like me, a daily user of Sublime Text 3, then you will find this code snippet very handy. Therefore I start to look for a way to add the open with Sublime Text 3 to the context Menu.

Thinking: “What if you will be able to just right click on a folder and the Explorer Context Menu will have an option to open that folder or file directly in Sublime Text 3?” Than would be wonderful.

The bellow code snippet will allow you to do just that. First open your favorite text editor and paste the code snippet bellow:

Make sure that you set the correct path on line 2 the variable st2Path

Save the file with the name OpenWithSublimeText3.bat. If your are running on windows 8.1, to launch the file just right click the file and chose “Run as administrator”.

Run as Administrator
Run as Administrator

Finally if everything is ok you will see the following windows.


Published by Eduard

A young and passionate man which loves to build and to customize WordPress Themes. His main passion is to work / improve / customize Divi WordPress Theme from Elegant Themes.

Join the Conversation


  1. I think I’am found.
    “hot_exit”: false
    “remember_open_files”: false
    in sublime-settings and it works.
    Am I wrong ?
    Thank you for your time.

    1. Hi, there is no option to delete the Open with Sublime Text 3 from the context menu of the recycle bin, since Windows, doesn’t give the option choose the context menu for which this customization should apply. I’m sorry.

  2. this open a file named “%1” whether I opened a file or a folder, so if you encounter the same problem, what I did is just replacing the “%%1” to “%1” to make it works in win10.

Leave a comment

Leave a Reply

Share This
%d bloggers like this: