configuring pep8

80 views
Skip to first unread message

Joseph Tosey

unread,
Mar 5, 2015, 3:54:56 PM3/5/15
to vim-sy...@googlegroups.com
I'm using mvim with vim-syntastic loaded as:

.vim/bundle/syntastic

I'm trying to use 4 spaces, but even though my tabstop is set to 4 spaces and my code has 4 spaces, I get E311 errors for every line.  I also get E301 errors, which I would like to disable.  I tried creating a ~/.config/pep8 config file, but syntastic appears to ignore that.  I can see flake8, pyflakes and pylint are installed, but I'm not clear on which one it is actually using.

Is there a doc that describes how these pieces fit together?

Any tips on how to configure mvim / syntastic so that it properly handles 4-space indentation and suppress E311 errors?

Thanks!

LCD 47

unread,
Mar 5, 2015, 4:30:11 PM3/5/15
to vim-sy...@googlegroups.com
On 5 March 2015, Joseph Tosey <jos...@warewolf.ca> wrote:
> I'm using mvim with vim-syntastic loaded as:
>
> .vim/bundle/syntastic
>
> I'm trying to use 4 spaces, but even though my tabstop is set to 4
> spaces and my code has 4 spaces, I get E311 errors for every line. I
> also get E301 errors, which I would like to disable. I tried creating
> a ~/.config/pep8 config file, but syntastic appears to ignore that.

What did you do, what did you expect to happen, and what happened
instead? What version of syntastic are you running? What options
relevant to syntastic do you have in your vimrc?

> I can see flake8, pyflakes and pylint are installed, but I'm not clear
> on which one it is actually using.

You can see the checkers syntastic will run with ":SyntasticInfo".

After running the checks, you can see which checker(s) has produced
the errors syntastic is showing you by looking at the status line of the
error window (assuming no other plugin did mess with w:quickfix_title).

> Is there a doc that describes how these pieces fit together?

Where exactly did you look?

- syntastic manual: ":help syntastic"
- checker-specific options: https://github.com/scrooloose/syntastic/wiki/Syntax-Checkers
- syntastic FAQ: https://github.com/scrooloose/syntastic

> Any tips on how to configure mvim / syntastic so that it properly
> handles 4-space indentation and suppress E311 errors?

/lcd

Joseph Tosey

unread,
Mar 6, 2015, 1:20:39 AM3/6/15
to vim-sy...@googlegroups.com
Thanks for this.   Syntastic was installed, but I found that SyntasticInfo did not work, which lead me to realize that the environment was not installed correctly.  I had stared with a config from a previous team that I worked with, and found that I had installed a version of python with homebrew that interfered with pylint, and installed depot_tools, which caused a second version of pylint to appear in my path.  I carefully built a config from scratch (although I'm still not completely clear how these three python syntax tools interact), but in doing so found that the default config works perfectly.
Reply all
Reply to author
Forward
0 new messages