How to open Sublime from PowerShell
Starting from 2014, Sublime includes a command line helper – subl.exe, located in Sublime’s installation folder C:\Program Files\Sublime Text 3.
Copy it into a folder included in the system path. For example:
Copy subl.exe from
C:\Program Files\Sublime Text 3
to
C:\Windows\System32
After that you can open Sublime right from the console by typing ‘subl’.
To open a particular file, type something like:
subl file.rb
The other way to make Sublime open from console is to modify your system PATH variable to include sublime’s instalation folder, but this is much more complicated.
David
Good article. Found it worked on Windows 10.
Oddly, I had to edit the Path variable to include the whole Sublime Text 3 directory, not just subl.exe for it to work.
Jack Spyder
For setting PATH
hit start, type “edit the system environment variables” (should come up after a few characters)
press the environment variables button, double click path in the top box.
click new, and add “C:\Program Files\Sublime Text 3”
and you’re done. Obviously if you’ve got sublime installed somewhere else, you need to give it the appropriate directory.