-kniya
Last Updated: February 25, 2016
·
1.506K
· arielle

Open with Sublime in Windows

  1. Open Registry Editor: regedit
  2. Computer > HKEYCLASSESROOT > Directory > Shell: create new key and name it "Open with Sublime".
  3. Under "Open with Sublime", create a new key called "command", its value/data is path + "%1".

%1 is there to parse in the folder name.

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

2 Responses
Add your response

4544

I found this powershell snip, that does the same thing more or less.

 REM Begin Copy
powershell
Set-Content "C:\Program Files\Sublime Text 2\subl.bat" "<a class="_hootified" a="" href="http://twitter.com/#!/@echo" onclick="javascript:var e = document.createEvent("CustomEvent"); e.initCustomEvent("hootletEvent", true, true, {type: "userHandle", value: "@echo"});  document.body.dispatchEvent(e); return false;">@echo</a> off"
Add-Content "C:\Program Files\Sublime Text 2\subl.bat" "start sublime_text.exe %1"
if (!($Env:Path.Contains("Sublime"))) {[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Program Files\Sublime Text 2", "Machine")}
exit
REM End Copy 

you just paste into a cmd shell NOT a powershell.

over 1 year ago ·
23727

Updated version for Sublime Text 3, working on Windows 7, 8 and 10:
https://gist.github.com/roundand/9367852

over 1 year ago ·