I just launched a new course on ES6! Use the code WESBOS for $10 off.

Strengthen your core JavaScript skills and master all that ES6 has to offer. Start Now →

Sublime Text subl command line access on windows

If you are a terminal or command line power user, you often want to open in from Sublime Text right from the cmd line. Often something like this:

subl style.css

On OSX and Linux, we have the subl command that comes with Sublime Text, to install it you can follow the instructions here.

However, on windows we need to do it a little different by creating something called a doskey.

So, if you wish to use the subl command to open files and folders from the command line in windows, you can use the following:

doskey subl="C:\Program Files\Sublime Text 2\sublime_text.exe" $*

Paste the above into your command line prompt and this will make the subl command available to you.

If you are using Sublime Text 3, use the following instead:

doskey subl="C:\Program Files\Sublime Text\sublime_text.exe" $*

This entry was posted in Sublime Text. Bookmark the permalink.

One Response to Sublime Text subl command line access on windows

  1. Wesley says:

    Hey, namesake!

    I’ve found it’s lacking a “3”, in the Sublime text 3 directory. Worked for me just in that way.

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *