Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 805 Bytes

README.org

File metadata and controls

24 lines (16 loc) · 805 Bytes

https://circleci.com/gh/JorisE/yapfify.svg?style=svg

Yapfify

Yapfify uses yapf to format a Python buffer. It can be called explicitly on a certain buffer, but more conveniently, a minor-mode ‘yapf-mode’ is provided that turns on automatically running YAPF on a buffer before saving.

Installation:

Add yapfify.el to your load-path.

To automatically format all Python buffers before saving, add the function yapf-mode to python-mode-hook:

(add-hook 'python-mode-hook 'yapf-mode)

Why not py-yapf?

Py-yapf works on a temporary file (placed in /tmp). Therefore it does not pick up on any project specific YAPF styles. Yapfify works on the original file, so that any project settings supported by YAPF itself are used.