blog.lobraun.de vim

In order to auto format your python code according to the guidelines defined by PEP8, you can use some sane default for editing python files and flake8 to check and fix possible errors in your scripts.

Default indentation rules for python files

The default indentation rules do not comply with PEP8. In order to change them for python files, create a new file in ~/.vim/ftplugin/python.vim and place the following content in this file: