- pyflakes. I installed this excellent plugin:
$ git clone git://github.com/kevinw/pyflakes-vim.git $ mkdir -p ~/.vim/ftplugin/python $ cp pyflakes-vim/pyflakes.vim ~/.vim/ftplugin/pythonI also followed his advice and installed his fork of pyflakes, which is incredibly faster than the original version:
$ git clone git://github.com/kevinw/pyflakes.git $ cd pyflakes $ sudo python setup.py install
This plugin actually highlights errors inline as you edit, and puts details in the status bar when you're over a line with an error:
- jslint. This plugin is easier to install, though it doesn't have the same on-the-fly checking as the pyflakes plugin.
$ git clone git://github.com/hallettj/jslint.vim.git $ cd jslint.vim $ rake install
Then you can run jslint easily from within Vim:
That'll give you a nice quickfix window with all your extant problems.
To have it run on save, simply add to
autocmd BufWritePost *.js JSLint
Finally, you can also pass options into jslint by putting them in
~/.jslintrc. For example, because I'm working with a few global namespaces/functions defined in other files, I have:
/* global Ext, Zenoss, _t */
That way, you can eliminate any noise and get right to the trailing commas.
I may try my hand at hacking the jslint plugin to do the same inline highlighting as the pyflakes plugin.