views:

170

answers:

3

I have visited Vim website , script section and found several synthax checkers for python. But which one to choose ? I would prefer something that supports python 3 as well, even though I code in python 2.6 currently.

Do all these checkers need a module like pychecker and pyflakes ?

I could install the most popular from scripts database but I thought to get some recommendations here first from what you consider the best and why. The script will have to work MACOS, windows and ubuntu, with MACOS being my highest priority.

In case you are wondering I am looking for syntax checking like the one used by PyDev in Eclipse IDE which underlines with a red wavy line all erros as you type.

A: 

Whether or not wavy red lines are displayed is related to the theme you're using, not the syntax checker or language. So long as your syntax file (try http://www.vim.org/scripts/script.php?script_id=790 ) checks for errors, you can show the errors with something like:

:hi Error           guifg=#ff0000 gui=undercurl
sleepynate
the vim (7.3) i am using already has the python.vim inside the syntax folder( I have also downloaded and installed the python3.0.vim) , but still it does not display errors, tried your command again it does not display errors. My point was not whether the line is red , purple, wavy or straight , but wether I can see errors as I type underlined, highlighted or whatever way will attrack my attention. Is there any special command to enable syntax checking ? I am talking python syntax here, not vim syntax.
Kilon
Ah sorry, I misunderstood. Your best bet is to combine the above highlighting command with something like pyflakes.vim and the pyflakes module. I'm not sure of another way.
sleepynate
Oh I see, than you very much friend for your reply, I will try to follow your advice.
Kilon
+2  A: 

These two websites really boosted my Vim productivity with all languages:

http://nvie.com/posts/how-i-boosted-my-vim/

http://stevelosh.com/blog/2010/09/coming-home-to-vim/

dougvk
very useful links thanks.
Kilon
+1  A: 

I use the PyFlakes vim script, and I'm pretty satisfied with it. Also, if you'd like PEP8 checking, try this script.

Attila Oláh
thank you, will try those two.
Kilon