+9
Completed

windows context menu right-click "edit with sublime" Notepad++ style

Nick Gorbikoff 13 years ago updated by Jon Skinner 11 years ago 5
I was wondering if it's possible to add a system wide windows explorer button " Edit with Sublime" similar to how Notepad++ does it or some other editors?
See attached screenshot.Image 9

Answer

+2
Answer
Completed
When installing, there's a checkbox "Add to explorer context menu" that can be ticked to enabled this.
+2
Answer
Completed
When installing, there's a checkbox "Add to explorer context menu" that can be ticked to enabled this.
+15
(I know this is an old thread, but since I dropped by looking for the same information and found it elsewhere, so here goes.)

If you've installed Sublime from the zip, follow the instructions from
http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/
Scroll down to 'chapter' by the name 'All file types'.

Taking the above page's guide as an example, you can add a shortcut key to the context menu item by adding the text you like to 'Open with Nodepad' -key's (Default) string.

Here's my setup as exported from regedit:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2]
@="Open with S&ublime Text 2"
[HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command]
@="c:\\apps\\tools\\sublime_text.exe \"%1\""

+7

A portable way to do it, write a ReplaceNotepad.bat:

put ReplaceNotepad.bat with sublime_text.exe and execute it.

@echo off

@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2"         /t REG_SZ /v "" /d "Open with Sublime"   /f

@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "\"%~dp0sublime_text.exe\" \"%%1\"" /f

pause

+11
Modified, sublime with icon:
@echo off
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2"         /t REG_SZ /v "" /d "Open with Sublime Text 2"   /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" 		  /t REG_EXPAND_SZ /v "Icon" /d "%~dp0sublime_text.exe,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "\"%~dp0sublime_text.exe\" \"%%1\"" /f
pause
+4

Bit improvised version: path to ST2 is configurable and adds it to Folders as well.


https://gist.github.com/mrchief/5628677

+12
https://gist.github.com/jcppkkk/8330314

Improved Version,
Open File with Sublime Text,
Open File with Sublime Text as Admin,
Open Folder with Sublime Text.
Execute .bat Script where Sublime Text installed.