I use vim for writing most of my C and Python code. For python I tend to use vim-flake8 for automated PEP8 checking. However I always forget how to install vim-flake8 and hence am writing this post
First install pathogen
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Then install the vim-flake8 plugin
cd ~/.vim/bundle
git clone https://github.com/nvie/vim-flake8.git
Finally add the following lines to .vimrc
execute pathogen#infect()
filetype off
syntax on
filetype plugin indent on
autocmd BufWritePost *.py call Flake8()