My Sublime Text 3 Setup for Python/Django Development

Text editors are an essential tool for every developer, and there is no right answer on which to use. It depends quite a bit on how you learned, and how your mind works. I grew up on the command line before every touching a GUI, and that has stuck with me throughout the years. This is reflected in my choice of text editors: Sublime Text 3 when in a GUI environment, and emacs for the terminal.

by flipperpa on March 10, 2019, 4:15 p.m.

I like Sublime because it is lightweight when compared to a fully featured IDE, such as PyCharm or Visual Studio. I use the command line for searching text with grep, sed, and awk, and I've always felt git should be used at the command line to make sure you're doing what you think you're doing.

Here's the set up I use for Sublime.

    "pep8_max_line_length": 88,
    "rulers": [88],
    "pep8_ignore": ["E203", "E231", "E309", "E501", "W503"],
    "python_interpreter": "C:/Users/tallen/AppData/Local/Programs/Python/Python37/python.exe"

By default Sublime Text writes a Tab when the tab key is pressed. PEP-8 recommends four spaces instead of a Tab. To change this, in the menu bar go to Preferences > Settings-User. You may have some defaults already in place; you want to add "translate_tabs_to_spaces": true, so it looks something like this:

    "translate_tabs_to_spaces": true,

It is a fair amount of setup up-front, but definitely worth it to me, as the code I produce on a regular basis is so much better than without this setup. Good luck and have fun coding!