I am new to Sublime Text 2. Basically I want to setup Sublime T2 as a Python IDE.
I have come across various questions with regards to Python and Sublime T2, but I couldn't find a guide from a beginners perspective. This is what I have done so far:
What steps (e.g. package installations, etc.) should I follow to complete the Sublime Python IDE Setup?
You need to install this first before you can install anything. Once installed, you will have the option to select 'Package Control: Install Package'. This will open up a list of available packages for Sublime Text. From here you can install any of the dozens of packages available.
For language specific settings, click Sublime Text > Preferences > Settings - More > Syntax Specific - User. Then save the file using the following format: LANGUAGE. sublime-settings. For Python-specific settings, save the file as Python.
Sublime Text can be used for much more than Python development and there are many useful tutorials that are not targeted at a specific programming language which are still useful. Super charge your Sublime Text 3 to increase your productivity provides many shortcuts and tricks for using the editor.
Besides Package Control, I use the following packages for Python development:
I found SublimeCodeIntel and Pylinter to be especially helpful for writing Python code in Sublime Text.
Besides installing these packages you should also tweak some of Sublime's preferences. For example, Python can be quite picky about whitespace. Therefore I recommend taking extra care for setting up how Sublime handles whitespace. I'm using these settings (put them in Preferences -> Settings - User):
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"ensure_newline_at_eof_on_save": true,
If you want to know more, I've written a blog post about setting up Sublime Text for Python development: https://dbader.org/blog/setting-up-sublime-text-for-python-development
You should be able to select a build system in the tools
menu.
Then, ctrl + B will build, and pull up the interpreter for you.
EDIT: ctrl + ` will also open your console, without building the project. From there, you can run Python commands with the built-in interpreter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With