ac8ihg
Last Updated: February 25, 2016
·
6.689K
· caioariede
00f1bf67a52fc75fb6da011edcf3f42b

Vim: Checking Python code on the fly

Syntastic is a syntax checking plugin that runs files through external syntax checkers and displays any resulting errors to the user. This can be done on demand, or automatically as files are saved. If syntax errors are detected, the user is notified and is happy because they didn't have to compile their code or execute their script to find them.

cd ~/.vim/bundle
git clone https://github.com/scrooloose/syntastic.git

Add Python support

It requires either flake8, pyflakes or pylint to be installed. I prefer to use flake8 that merges pyflakes and pep8 functionality.

pip install flake8

Check file syntax on open

This is optional but useful. Otherwise Syntastic will only check syntax after saving the file.

let g:syntastic_check_on_open = 1
Say Thanks
Respond
Filed Under

Awesome Job

E4857be2 008e 11e8 8271 f03109811178
Software Engineer
·
San Francisco Bay Area (San Carlos)
·
Full Time