Automatically formats Python code to conform to the PEP 8 style guide using autopep8 module
- format / preview code according PEP8
- format / preview multi-selected text
- format / preview all python modules in folder
- side bar menu
- formated code while saving
With the Package Control plugin: The easiest way to install AutoPEP8 in through Package Control, which can be found at this site: http://wbond.net/sublime_packages/package_control
Once you install Package Control, restart ST2 and bring up the Command Palette (Command+Shift+P
on OS X, Control+Shift+P
on Linux/Windows). Select "Package Control: Install Package", wait while Package Control fetches the latest package list, then select AutoPEP8 when the list appears.
With Git: Clone the repository in your Sublime Text "Packages" directory:
git clone git@github.com:wistful/SublimeAutoPEP8.git AutoPEP8
Without Git: Download the latest source from GitHub and copy to your Sublime Text "Packages" directory as AutoPEP8.
AutoPEP8 runs in one of two modes:
- AutoPep8 Format (
Command/Control + Shift + 8
) - automatically formats code - AutoPep8 Preview (
Command/Control + 8
) - open new tab to preview changes
You can also select mode by mouse right click.