Stealing pages from the server...

Use SUBL Command in Windows


Introduction

It’s sometimes easier to edit a file from terminal by using Sublime Text, and yet it is not the default in Windows. This tutorial will show you how to use the command line to open files with Sublime Text in Windows.

Steps

  1. Download the latest Sublime Text from here.

  2. Append subl.exe to the system PATH environment. In my case, the path is at C:\Program Files\Sublime Text 3. Therefore, open the terminal and type in set PATH=%PATH%;"C:\Program Files\Sublime Text 3". set is a command that changes cmd’s environment variables only for the current cmd session. The %PATH% part expands to the current value of PATH, and the path afterwards is then concatenated to it.

  3. Use in your terminal/console subl as a command to open whatever file. For example to open README.md, just type in subl README.md.

Conclusions

Sublime Text is a powerful text editor that is popular among programmers. To boost their productivity, all programmers should be aware of these tips.


Author: Yang Wang
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Yang Wang !
 Previous
Run Octave Script from Command Line Run Octave Script from Command Line
Octave is an open-source replacement for MATLAB, a software and programming environment for numerical arithmetic and data analysis. Sometimes it's more convenient to run Octave scripts from the command line.
2021-12-24
Next 
Why We Need PEP Why We Need PEP
PEP8 was designed to make Python code more readable. If you're new to Python, remembering what a piece of code does a few days or weeks after you created it can be challenging. If you follow PEP8, you may be able to assure that your variables have been properly named.
2021-12-15
  TOC