vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

using vnu.jar #1259

Closed ghost closed 9 years ago

ghost commented 9 years ago

I have had success using html validator as in api = 'https://validator.nu/'

is there a possibility to use the vnu.jar file as an executable.

I can use it as a command line tool: java -jar ~/vnu.jar somefile.html

but this:

let g:syntastic_html_validator_exec = '~/vnu.jar'

returns an error.

presumably i need to prefix this with java jar somehow?

any help appreciated.

lcd047 commented 9 years ago

is there a possibility to use the vnu.jar file as an executable.

Not without writing a new syntastic checker.

presumably i need to prefix this with java jar somehow?

Nope, g:syntastic_html_validator_exec is supposed to point to the curl executable.

lcd047 commented 9 years ago

You can however run it as a HTTP server:

$ java -Xss512k -cp vnu.jar nu.validator.servlet.Main 8888

and then you can tell syntastic to use it:

let g:syntastic_html_validator_api = 'http://localhost:8888/'

This is much faster than running java -jar vnu.jar every time you want to check something.

ghost commented 9 years ago

perfect great explanation. decent html checking in vim awesome! thanks for the fast reply and thanks for the top plugin.