Sublime text 3.x – Download setup customize to run python

Sublime text 3.x is one of the light weight multi platform python editor,one good thing about this editor is that you can even keep a portable version for windows OS.

In this post, we are going to discuss python setup on windows OS

Prerequisite

You should have python installed on your machine, if not follow python on windows

Download

https://www.sublimetext.com/3

Install Packages

Sublime Text doesn’t come with a default setup for python auto suggestion, we need to install some packages to execute python.

To install package in Sublime text

Ctrl + Shift + P | Install Package | <name of package>

Let’s install following packages one by one

This helps in python auto completion or autosuggestion

Helps in python auto completion with added features, find more on Anaconda

This will enable right click context menu option “create python package” on project structure

You can activate this Color Scheme under Preferences | Color Sceheme… 

You can activate this theme under Preferences | Themes… 

Run command

To run or execute python on sublime text, key press Ctrl + b

File | new file and save as test.py

Let’s see in action

Key press Ctrl+b and see the output

Customization

There are several theme and color-schemes available to install for sublime text 3.x, chose which one suits to your need,

Customise editor panel

Preferences | Settings | preferences.sublime.settings – user

and save

This will increase the font size of editor panel, to increase the sidebar font details, follow below steps

 

Customise sidebar 

Step 1 : Tools | Command Pallete | Install Package

type PackageResourceViewer and enter

Step 2 :  Tools | Command Pallete

type prv open and enter

Step 3 : Type Theme – [installed theme], select to edit

Search for //Sidebar entry and add below lines as needed

 

To view folder structure of current project

View | Side bar | Show Open Files

 

Link to specific python version

Create a new file

Note : Under “cmd” – mention path of python installed, in my case it is c:\\python folder

Save the file with name “myPython.sublime-build” under …\Data\Packages\User [for portable version]

if installed, then under %AppData%\Roaming\Sublime Text 3\Packages\User

Keep “myPython” selected when you run the script, you can do this under Tools | Build System | myPython

 

If you have any interesting setup or tweaks for sublime text, please feel free to comment!!!

Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

Leave a Reply

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