Sublime Text 3 for Python development
I’ve been heavy vim user for a couple of years. I had a very cool configuration, really got all these fancy vim key shortcuts muscle-memorized.
But then vim plugins (bundles) started annoying me. Often my configuration became obsolete after an upgrade. I had to go through documentation and set everything yet again.
- Why switch to Sublime Text 3?
- Brief history
- Final words
- Two years later update
Why switch to Sublime Text 3?
For me, these are the reasons:
- Sublime Text 3 is sooo pretty
- it’s also so freaking fast, way faster than Sublime Text 2
- and has vast range of plugins, and easy configuration.
Not much, you say? It was enough to made me switch editors.
Sublime Text 2 was using Python 2.x as an API interpreter. Early in 2013, first build of Sublime Text 3 appeared, not even remotely complete. And it shipped with Python 3.3 interpreter.
Since then, Sublime Text 3 (now beta build 3047 or bleeding edge dev build 3052) has come a long way and can be used by everyday programmer.
What’s important is that many Sublime Text 2 plugins have been either ported or made Python2/3 compatible.
Perv Orange is also very good, but a bit darker than Monokai.
Both schemes have better restructuredText coloring. Default Sublime Text 3 syntax highlighting for rsT is… in a poor state.
Visual preview of my current configuration. (click to enlarge)
Some visual settings:
Configuration for Meslo:
Configuration for Ubuntu Mono:
And some additional typeface-agnostic but font-related settings:
This part of configuration helps with writing Python.
Fixes some minor annoyings, like opening a preview after selecting file in side bar.
You can also change some settings on a per-project basis.
Simply open your
Project → Edit Project) and add
For lazy people: https://gist.github.com/pbanaszkiewicz/6351258.
These are the plugins I can’t live (and program) without. Absolutely necessary.
A package manager for Sublime Text 3. Helps you search for, install, upgrade and remove most of available Sublime Text 3 packages.
Very popular and quite easy for basic application. There’s also some payable SublimeGit plugin I haven’t tried out yet. (It seems nice, though!)
Adds small icons in left margin indicating which lines have been added, modified or deleted.
GitGutter icons: for deleted, added and modified lines. (click to enlarge)
Adds obvious (but missing from pure Sublime Text 3!) context menu options for side bar.
Additional items in sidebar’s context. (click to enlarge)
So far, the best Python completion and linter for Sublime Text 3. You can believe me, I tested other ones, too.
Anaconda is actively developed, and its’ author is very responsive.
I highly recommend installing this package from
git, as I’m not sure
if recent critical patches were already pulled in by Package Control.
Warning: do not mistake with Continuum.io’s excellent Anaconda suite for Python.
This plugins helps managing (adding, editing and removing) GitHub gists. Needs a little bit of configuration efforts, but it’s generally worthwhile.
I hope I was somehow able to help you boost your Python development or encourage to use Sublime Text 3. Have a good time and nothing to debug!
Two years later update
It’s December 2015, so over 2 years have passed since this post was originally published. What changed in Sublime Text 3? Am I still using it?
The answer is: yes! Even though the development of Sublime Text 3 is stalled (if only it was open source) I’m still using it. It’s a great product that “just works”.
Here are changes in my configuration:
- I switched my theme to Solarized Light, because I’m programming a lot in a daylight and I need a good, light background.
- I’m using a new font: Hack. It works great, but as I mentioned in the original article, I like to switch fonts now and then. I’ll probably switch to something else really soon.
- Now I also use a bigger font size, and it works better for my eyes.
Here is a list of plugins that I got rid of:
- Gist: I’m not sharing so much code to be in need of plugin for that service.
- SublimeGit: it was mentioned in update to the original article, but this
plugin works excellent. It may not work great during rebases (doesn’t show
conflicting files), but I’d not trust any tool except
gitin such time.
I’m really interested to see how my usage of Sublime Text 3 develops in future.