DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for How to open sublime text from the windows command line
milindsoorya
milindsoorya

Posted on • Updated on • Originally published at milindsoorya.com

How to open sublime text from the windows command line

Introduction

I am a very big fan of VS Code. I genuinely believe that it is the best IDE for web development. These days I am coding more in python and my interest has shifted towards python IDE's such as Pycharm and Sublime text.

Pycharm is the OG python IDE and it has all the features that you might want. But, it's a bit bulky and takes a lot of resources.

In some cases, I just want to quickly get up and going with as little friction as possible and Sublime text is the perfect answer for those scenarios.

Why open Sublime from cmd?

As I mentioned above, one of my favourite features of VS Code is that it can be opened from any directory using the command code . and VS code will open with all the files in that directory. This simple step has made me more productive.

In this article, I will show how to do the same thing using Sublime Text in windows.

STEP - 1: Search for Environment Variables in the windows search

Search for Environment Variables in the windows search

STEP - 2: Select the environment variable option

select environment variables

STEP - 3: Click on the path and then edit

Click edit

STEP - 4: Add path to your sublime installation

usually, it will be at C:\Program Files\Sublime Text 3.

After doing this click ok and exit.

Add path to your sublime installation

STEP - 4: Open sublime from any location

Just go to your desired directory and open a command prompt and input this command.

subl .
Enter fullscreen mode Exit fullscreen mode

Open sublime

That's it!! Thanks for reading.

Check out my website for more useful articles.

Top comments (3)

Collapse
 
sadullah profile image
Sadullah TANRIKULU

Good job milindsoorya! Thank you! Could you help me, i can't run the python codes in sublime text. When i run the code, "python not found" warning is output. I searched but i can't find a solution. Also i sent two screen shot to make clear.

Collapse
 
milindsoorya profile image
milindsoorya

Hi,
I think you might have to add python to the windows path variable. You can verify this by typing python in the cmd prompt. If it shows the version and other information then you are all good, else try this:
Add python to your path environment variable
Newer Python 3.7 will be installed at: C:\Users\YourUserNameHere\AppData\Local\Programs\Python\Python37

ref: stackoverflow.com/questions/135965...

Collapse
 
sadullah profile image
Sadullah TANRIKULU

Thanks i overcame it, your answer is beneficial.

We are hiring! Do you want to be our Senior Platform Engineer? Are you capable of chipping in across sysadmin, ops, and site reliability work, while supporting the open source stack that runs DEV and other communities?

This role might just be for you!

Apply now