I use Google
closure-compiler to check syntax errors in a JS file, the problem is that if there is no error it gives the source of the file to its STDOUT and with the default settings this counts as an error and clutters the quickfix window.
In Bash I can do this:
$closure-compiler foo.js 1>/dev/null and then it gives only errors, otherwise nothing.
But is it possible to specify this command to the Vim
makeprg option? I tried many ways to no avail, for instance this:
set makeprg = closure-compiler\ %\ 1>/dev/null
doesn't return STDERR as well as STDOUT.
set makeprg = closure-compiler\ %\ '1>/dev/null'
1>/dev/null as a file name, etc.
I know I can create a Bash-script but is it possible to do it only in
I suppose there is no way for this without the bash-script, since errors are STDERR only for
closure-compiler, but Vim (I suppose) uses the terminal program and for it STDERR of
closure-compiler becomes STDOUT, so that Vim doesn't receive STDERR in this case but STDOUT from the terminal.