I'm using Syntastic for syntax checking in Vim - whenever I save an .rb
file, it runs it through a syntax checker and highlights errors for me. Spiffy. Same for several other file types: HAML, HTML, etc. It does this by calling out to external syntax checkers and displaying the errors they return.
Syntastic can be configured various ways, but this is what I added to my .vimrc
:
" When writing a file, if there are errors, have Syntastic plugin mark them
let g:syntastic_enable_signs=1
let g:syntastic_auto_loc_list=1
Lately, I've had several elusive Javascript bugs that I eventually found by copying and pasting my code into the web interface of JSLint. I'd really like to have JSLint run on my .js
files every time I save them, but searching for "command line JSLint" has mostly gotten me confusion.
Is there an official command-line version of JSLint? Does anybody have clear instructions on getting JSLint to run via Syntastic?