Open/Start Sublime Text in (windows) command line shortcode with a specific project

Open your Sublime Text2/3 by shortcode “subl .” on command prompt with a specific project.

 

We often need to open projects in between another project for some updates/support. As I am using Sublime Text 3 for coding, so I open/drag the folder to the editor project panel. But, It is risky and time consuming to search any file from all open projects. So, I was looking for a quick solution that I can easily open the project on a new window of Sublime Text. And here is the process…

 

Step 1:
Press Menu Key/Windows Logo Key > type “This PC\My Computer”, Write click on it and click on “Properties”
Or: Control Panel > System and Security > System

 

Step 2:
Click on the “Advanced system settings” > click on the “Environment Variables” (at the bottom on the new popup window)

 

Step 3:
Now you will get another window that have 2 sections User Variables and System Variables

> Add user variable by client on the New button
Variable name – SUBLIME_HOME
Variable value – C:\Program Files\Sublime Text 3\ (it depends, when you install Sublime Text. I install in C drive and it was Sublime Text 3)

> Now in system variables list, select “Path” variable and client on edit button. Add
“;%SUBLIMETEXT%” at the end of the path variable value.

Shortcut 😀 : just paste “;C:\Program Files\Sublime Text 3\” (it depends, when you install Sublime Text. I install in C drive and it was Sublime Text 3) at the end of the Path variable value. There may be existing values, so keep in mind to add a “;” before your value as above example.

 

Step 4:
Hope you are in project folder > Press Ctrl+Shift and write client > Client on the “Open command window here” > type “subl .”/”sublime .” (remove qoutes and add a dot with a space) on command prompt > And the project will open in a new window of Sublime Text.

Or you can open command prompt any where and navigate to the specific project folder and run the “subl .”/”sublime .” code, the result will be same.
Or You can just open the command prompt and run the command “subl”/”sublime” to open the Sublime Text

 

**Check your Sublime Text installation folder (mine is C:\Program Files\Sublime Text 3\), check the name of the .exe file. It should be “subl.exe” or “sublime.exe” and use “subl”/”sublime” depends on the exe file name.

 

Check this video for a quick demonstration and let me know your feedback.

Sublime Text Editor – User Preference Setting

If you working in any editor, you would like to set the environment as you want. And in Sublime Text you can set your preferences in a easy way.

– Go to Preferences > Settings – User  and put the below preferences. You can also tweak the settings by blocking/unblocking the setting by double front slash (//) and see the magic 🙂

**keep all settings within curly brackets. And here is my settings 😉

{
“bold_folder_labels”: true, // set the sidebar’s folder name to bold
“caret_style”: “phase”,
“wide_caret”: true, // set the cursor
“color_scheme”: “Packages/User/SublimeLinter/Monokai (SL).tmTheme”,
“fade_fold_buttons”: false,
“font_size”: 11, // set font size of the editor
“tab_size”: 4, // set the tab size to 4 space
“highlight_line”: true, // highlight the line
“highlight_modified_tabs”: true, // highlight the (file) tab if the file is modify/edit
“ignored_packages”:
[

// ignore packages going here
//”Vintage”
],
“line_padding_bottom”: 1, // set the bottom padding of each line
“line_padding_top”: 1, // set the top padding of each line
“word_wrap”: true // set the word wrapper to true to stop horizontal scrolling
}

Let me know your settings in comment.