Installing vim-flake8

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()
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s