Make Sublime Text as the best IDE for full stack python development

Install Sublime Text 3 (ST3)

Actually here nothing much to say about installation of ST3, because they have very good documentation and easy to install binary for all platform. If your OS is not Ubuntu, please ignore following step, because here discussion about install ST3 at Ubuntu in better way.

Good news that we have Ubuntu PPA for ST3, thanks to [@webupd8team] . I would recommend you to install ST3 from ppa, it will gives you lots of flexibility. Steps are following:

  1. Open your terminal
  2. Add ppa : `~$ sudo add-apt-repository ppa:webupd8team/sublime-text-3`
  3. Install ST3: `~$ sudo apt-get update && sudo apt-get install sublime-text-installer`

Install Required ST3 Packages (Plugins)

First of all you have to install Package Control, please follow corresponding instruction and make sure it is installed. Followings are list of packages (some are required, some are optional and some are recommended)

  1. AdvancedNewFile
  2. AutoPEP8
  3. Git
  4. GitGutter
  5. Gitignore [optional]
  6. Solarized Color Scheme [optional but recommended for good looking]
  7. SideBarEnhancements
  8. SublimeLinter
  9. SublimeLinter-annotations
  10. SublimeLinter-csslint
  11. SublimeLinter-flake8 [swipeable with pylint and should one of two]
  12. SublimeLinter-pylint [like no.10 should be choose one of two]
  13. SublimeLinter-html-tidy
  14. SublimeLinter-jshint [nice to have for web application, please follow it’s own documentation before active it]
  15. SublimeLinter-json
  16. SublimeLinter-pyyaml
  17. ProjectManager [optional]
  18. PackageResourceViewer [optional]
  19. Pandoc [optional]
  20. MarkdownEditing [optional]
  21. Markdown Preview [optional]
  22. Restructured​Text Improved [optional]

It is recommended that you install all packages using `Package Control` but you could also install manually, in that case please follow corresponding documentation.

Instruction for installing packages using Package Control

  1. Install Package Control if you haven’t yet.
  2. Use cmd+shift+P then Package Control: Install Package
  3. Search for certain package, should be appeared in list and install it.
  4. You might need close ST3, to see all changes

Packages selection for `Sublime Text 3` has no restriction, I suggest you explore more packages as much as possible, but always keep in mind that many packages install at a time might enriched your Sublime Text‘s features but in the meantime will keep it busy too! as a result performance decreasing. Plugin/Package you should install and use, only if you know that why need it(package), how it is working, other than any unnecessary package you should avoid and also make sure different packages are not overlapping same feature. Above listed packages are safe and necessary, but here also depends on development environment, you could add/remove packages from that list.

Note: some of packages need executable path is available at `PATH` variable to work, i.e flake8, pylint, csslint, etc. Please follow each package documentation.

Sublime Text 3 Settings

User Setting:

To find user settings, might vary from earlier version to new version. Example from `Sublime Text 3 build 3126` user settings is not directly available in menu, instead you will open default settings (`Preferences > Settings `), two columns will be opened and one of this is user settings; beside earlier version you will find User Settings directly (`Preferences > Settings User`)

{
"auto_complete_triggers": [{
"characters": ".",
"selector": "source.python"
}],
"color_scheme": "Packages/Solarized Color Scheme/Solarized (light).tmTheme",
"font_size": 12,
"ignored_packages": [
"Markdown",
"RestructuredText",
"Vintage"
],
"show_line_endings": true,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true
}

Above is the basic user settings, you could add more settings, documentation here

Sublime Jedi Settings

  1. Go to Preferences -> Package Settings -> Package Setting -> Jedi -> Settings User
{
"auto_complete_function_params": "required",
"sublime_goto_layout": "single-panel"
}

More settings options could be found here

SublimeLinter Settings

  1. Go to Preferences -> Package Settings -> Package Setting -> SublimeLinter -> Settings User
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"annotations": {
"@disable": false,
},
"csslint": {
"@disable": false
},
"flake8": {
"@disable": false,
"max-complexity": 15,
"max-line-length": 120
},
"htmltidy": {
"@disable": false
},
"jsl": {
"@disable": false
},
"json": {
"@disable": false
},
"pyyaml": {
"@disable": false
}
}
}
}

More about settings, you could find it’s own documentation.

AutoPep8 Settings

  1. Go to Preferences -> Package Settings -> Package Setting -> AutoPep8 -> Settings User
{
"max-line-length": 120
}

Per project settings (sublime-project file)

One of the great feature of Sublime Text is that you could make project specific editor settings (may you already know about it.), more details here . If you are developing buildout based python project, `plone.recipe.sublimetext` for you! this is good tool that will manage your project file more effectively.

Original Source