Python Imports Sorter
Sublime Text 2 plugin to organize your imports easily.
Details
Installs
- Total 12K
- Win 5K
- Mac 4K
- Linux 4K
Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 1 | 0 | 1 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
python_imports_sorter
Sublime Text 2/3 plugin for organizing imports in your Python source code. Rules are described by Guido here: http://www.python.org/dev/peps/pep-0008/#imports
Example
Input
import sys
import project.module1
import os
import django.contrib
import django.admin
When selecting and pressing Cmd + Shift + I it will format this like this:
Output
import os
import sys
import django.admin
import django.contrib
import project.module1
Spliting arguments
You can split long-line python keyword arguments into the new lines using additional command: split arguments. This feature is available only for ST3+
Example:
dict(very_long_variable_name=1, even_longer_variable_name=2, additional_param=3)
to the form of : “
dict( very_long_variable_name=1, even_longer_variable_name=2, additional_param=3 )
Just use command pallete pressing `Super+Shift+P` and chose `split arguments`
action
Installation
============
Use Sublime Text 2 Package manager. Look for python_imports_sorter