Last Updated: February 25, 2016
·
1.169K
· alfred-nsh

Using jshint with vim

let &efm  = '%f: line %l\, col %c\, %m'
cex system('jshint path/to/dir')

If you are using grunt, you can change the reporter to match the above format(default format of jshint, but grunt-contrib-jshint changes the default). Just in the options for jshint in your Gruntfile add the following:

reporter: 'node_modules/grunt-contrib-jshint/node_modules' + 
    '/jshint/src/reporters/default'

This will overrides grunt-contrib-jshint reportter to user default jshint reportter which matches above format. Then you can change your system to the following:

cex system('grunt jshint')

or

cex system('grunt <whatever command that will invoke jshint>')

You can go to next file using :cn and see all the files using :cw. Check :h quickfix for full list of commands.