Vim errorformat for jshint (with example) -


i trying write efm this:

file: app/assets/javascripts/topbar.js   line 17, col 3, missing semicolon.   line 19, col 19, 'is_mobile' used before defined.   line 21, col 1965, expected '{' , instead saw 'check'.   line 25, col 18, 'onscroll' used before defined. file: app/assets/javascripts/trends.js   line 2, col 55, missing semicolon.   line 6, col 27, 'trendtypeselected' used before defined.   line 7, col 32, expected '===' , instead saw '=='. jshint check failed 

but think missing concept of file on separate line. can me out this?

this have far , not work:

%-pfile:\ %f,line\ %l\,\ col\ %c\,\ %m 

thanks!

solution:

set efm=%-pfile:\ %f,%*[\ ]line\ %l\\,\ col\ %c\\,\ %m,%-q,%-gjshint\ check\ failed 

vim provides %p, pushes parsed file (%f) onto stack, see :help errorformat-separate-filename.

so error output, %+pfile: %f,...


Comments