Skip to content

Instantly share code, notes, and snippets.

@peterhs73
Last active December 4, 2019 05:24
Show Gist options
  • Save peterhs73/24f4e99e1a096538c6e0635fa6289d4e to your computer and use it in GitHub Desktop.
Save peterhs73/24f4e99e1a096538c6e0635fa6289d4e to your computer and use it in GitHub Desktop.
setup sublime text as python IDE

Sublime Text Setttings

A quick starter guide to use the sublime (with personal preference on linting). Its used as a Python specific IDE.

PACKAGE settings

The followings are the user settings to the packages:

Install anaconda package and use anaconda lint

{
    "anaconda_linter_mark_style": "stippled_underline",
    "anaconda_linter_underlines": false,
    "anaconda_linting_behaviour": "save-only",
    "display_signatures": false, //this will not show the docstrings of the reference method
    "pep8_ignore":
    [
        "E309",
        "W503",
        "E203"
    ],

}

install sublack and use black as a python formatter

location of black (pip install black) and find location with which black or where black depends on system.

{
	"black_line_length": 79,
	"black_command": "...", 
	"black_confirm_formatall": false,
}

install gitgutter

install Docblockr_Python

SUBLIME settings

according to pep8, spaces are recommanded

{
"translate_tabs_to_spaces": true,
}

PROJECT settings

after saving as a project, then open edit project

  • Project setting for setting up virutalenv in a project (note build_system will be automatically set) use which python or where python to find the right location of python interpretor
  • The docstring formatter should be on a project basis.
{
"settings":
	{
		"python_interpreter": "...",
	}
 "DocblockrPython": //this should be on the project basis
    {
        "formatter": "sphinx"
    },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment