Skip to content

fujimisakari/py-autopep8.el

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-autopep8.el

https://travis-ci.org/paetzke/py-autopep8.el.svg?branch=master http://melpa.org/packages/py-autopep8-badge.svg

Provides the py-autopep8 command, which uses the external autopep8 tool to tidy up the current buffer according to Python’s PEP8.

Install autopep8 and download py-autopep8.el

$ pip install autopep8
$ wget http://git.vanneva.com/py-autopep8.el.git/blob_plain/HEAD:/py-autopep8.el \
       -O /your/path/py-autopep8.el

Add the before-save-hook to your ~/.emacs

(add-to-list 'load-path "/your/path/")
(require 'py-autopep8)
(add-hook 'before-save-hook 'py-autopep8-before-save)

You can also install py-autopep8 with MELPA:

M-x package-install RET
py-autopep8 RET

Now every time you save your Python file autopep8 will be executed on the current buffer.

To customize the behaviour of “autopep8” you can set the py-autopep8-options e.g.

(setq py-autopep8-options '("--max-line-length=100"))

About

py-autopep8.el integrates autopep8 into Emacs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 69.5%
  • Shell 22.3%
  • Python 8.2%