3

I have included the following lines in my vimrc file to run syntastic plugin.[closed]

let g:syntastic_mode_map = { 'mode': 'active',
                           \ 'active_filetypes': [],
                           \ 'passive_filetypes': ['html'] }

" To enable this plugin, edit the .vimrc like this:
let g:syntastic_javascript_checker = "closurecompiler" 
" and set the path to the Google Closure Compiler:
   let g:syntastic_javascript_closure_compiler_path = '~/.vim/closure-compier/compiler.jar'

 let g:syntastic_enable_signs=1
 let g:syntastic_auto_loc_list=1

But it doesnt seems to work,I tried debuging the closurecompiler.vim script .Inside it function SyntaxCheckers_javascript_GetLocList() has the makeprg variable when i echo the variable it prints the following line

 java -jar ~/.vim/closure/closure.jar --js 'workspace/abc.js'

but does not show any error ,however if i enter same line in console i get all errors What am i doing wrong in my setup. you can see my setup on github

CharlesB
  • 86,532
  • 28
  • 194
  • 218
deven98602
  • 1,090
  • 9
  • 19
  • 1
    What you type in the terminal is different from what you have in your vimrc. Fix that to see if it works better. Also I think that it's "closure-compiler", not "closure-compier". – romainl Dec 30 '12 at 15:58
  • 1
    I think my `closurecompiler` argument was right and not `closure-compiler` because you can see from image that now its not even able to find right syntax checker. Also if put the line printed by vim directly in my terminal i get o/p `java -jar ~/.vim/closure-compiler/compiler.jar --js 'Desktop/syntx.js' Desktop/syntx.js:1: ERROR - Parse error. IE8 (and below) will parse trailing commas in array and object literals incorrectly. If you are targeting newer versions of JS, set the appropriate language_in option. var obj = { ar : 'sadada', ^ 1 error(s), 0 warning(s)` – deven98602 Dec 30 '12 at 18:10
  • [vim setup](https://github.com/devendra98602/myvim) This is setup is use Is there any thing wrong in it? – deven98602 Dec 31 '12 at 04:16

1 Answers1

1

I think i found your mistake. I just downloaded your setup via github and this line had a typo in your .vimrc file:

let g:syntastic_javascript_closure_compiler_path = '~/.vim/closure-compier/compiler.jar'

When I changed this line to this:

let g:syntastic_javascript_closure_compiler_path = '~/.vim/closure-compiler/compiler.jar'

And launched gvim abc.js I get this:

   ss of vim w/ abc.js and closure

Seems to be working now.

slm
  • 15,396
  • 12
  • 109
  • 124
  • Man I am Dumb! Romainl did pointed out this mistake but i was too dumb to understand but thanks anyway for taking out time to answer – deven98602 Jan 01 '13 at 16:06
  • No prob. Now I know how to use syntastic and google's closure lint checker so it was worth it. Thanks for the knowledge! Please accept this answer if you don't mind. – slm Jan 01 '13 at 16:09
  • ya sure, but for awarding bounty stackoverflow has rule that i can award it only after 24 hrs. – deven98602 Jan 01 '13 at 16:14
  • Do you mean that you have to wait 24 hours or that the bounty has to be offered for 24 hours and then someone answers the question? – slm Jan 01 '13 at 16:16
  • 2
    @deven98602, told you so ;-) – romainl Jan 01 '13 at 16:39
  • yes I will have to wait for 24 hrs before i can award your answer – deven98602 Jan 01 '13 at 16:47