Open ScriptDevil opened 9 years ago
@ScriptDevil Dei! i get stuck on the autopep8-path. how do you manage that ? MELPA ? and is it py-autopep8 ?
You told me you use virtualenv, right?
$ pip install autopep8
Use /full/path/to/virtualenv/bin/
@ScriptDevil no that's all fine.. for elisp to understand "autopep8-path" and "autopep8-command" don't i need something ?
Oh, that was a typo. The first line should also be (setq autopep8-path ..)
It is just a variable I created on the fly. Emacs doesn't really "understand" it. I understand where your confusion stems from. Mysterious action at a distance...
When you want to stylize the file you are currently editing, M-x my-pep8. Bind it to a key if you will. Else, if you want to run it each time on any python file is saved.
Note: I have used
--ignore errors
to ensure it doesn't remove erroneous lines just in case you have a habit of saving every time. It might still crap out. Use the optional part with care, though. Of course undo will still work.