Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Automatically formats Python code to conform to the PEP 8 style guide using autopep8 and pep8 modules
Failed to load latest commit information.
messages Updated changelog.
packages_py2/lib2to3 fix issue #21
packages_py3/lib2to3 fix issue #21
sublimeautopep8lib Always work with unicode.
AutoPep8 (Windows).sublime-settings
AutoPep8.sublime-commands Minor changes to context and sidebar menu files.
Context.sublime-menu Cleanup after merging pull request.
Default (Linux).sublime-keymap close issue #3; close issue #5;
Default (OSX).sublime-keymap
Default (Windows).sublime-keymap
Default.sublime-commands update config path
Main.sublime-menu use different default settings (python->pythonw) on Windows platform Cleanup after merging pull request.
Side Bar.sublime-menu Removed trailing comma that was causing parsing of file to fail.
messages.json Updated version to 1.1.3. Changed sidebar and context menu layout(#32, @brianhornsby).

Sublime Auto PEP8 Formatting


Automatically formats Python code to conform to the PEP 8 style guide using autopep8 module Supported ST2 and ST3


  • format / preview code according PEP8
  • format / preview selected text
  • format / preview all python modules in folder
  • side bar menu
  • formated code while saving


The easiest way to install AutoPEP8 in through Package Control, which can be found at this site:

Once you install Package Control, restart ST2/ST3 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.

Per-project settings

    "settings": {
        "sublimeautopep8": {
            "max-line-length": 79,
            "format_on_save": false,
            "show_output_panel": true,
            // show Format/Preview menu items only for views
            // with syntax from `syntax_list`
            // value is base filename of the .tmLanguage syntax files
            "syntax_list": ["Python"],
            "file_menu_search_depth": 3  // max depth to search python files


  • SideBar - right click on the file(s) or folder(s)
  • Active view - right click on the view
  • Selected text - right click on the selected text
  • On Save - provide by settings: option format_on_save
  • Command Palette - bring up the Command Palette and select PEP8: Format Code or PEP8: Preview Changes
  • Hotkeys - Command/Control + Shift + 8 to format code, Command/Control + 8 to preview changes
Something went wrong with that request. Please try again.