This is a quick step-by-step tutorial going over how to install Sublime in Windows so that, when you type subl in the command line, it will open the Sublime Text Editor.
In order to be able to open Sublime from the command line, Sublime Text must first be installed in your system. You can install the latest version of Sublime text here:
(Don’t know if you are using Windows 32 bit or 64 bit? Look in Start -> Computer (This PC) -> Right Click Properties, look for the Operating System under System Type.)
Now, it is time to add the path to the Sublime install to your system variables. This will allow you to access Sublime directly from the command line.
In order to do this:
- Go to System -> Advanced System Settings -> Environment Variables
- Go to System Variables -> Path and to the end of path (if you have existing variables in your path, don’t forget to insert a ; first) add the location you downloaded Sublime Text to.
For example, I downloaded Sublime Text 3 and the location I downloaded it to is C:\Program Files (x86)\Sublime Text 3.
Therefore, to the end of my PATH variable under System Variables I added ;C:\Program Files (x86)\Sublime Text 3.
You might have to restart your system for it to work.
To test, type subl into the command line. Sublime text should open. If it doesn’t, feel free to comment here!