0

I am trying to get jshint to work within Syntastic (gvim). The Syntastic wiki says it can be used for html validation. I added following line to my vimrc.

let g:syntastic_html_checkers = ['jshint']

Available and currently enable checker: jshint is detected.

Now when I try to edit a html file no errors are given.

When I try to use the w3 validation instead:

let g:syntastic_html_checkers = ['w3']

I get an abnormal error 26.

Can somebody help me? The official readme is confusing and I cannot find much other sources.

Christoph
  • 1,347
  • 2
  • 19
  • 36
  • No, jshint is *only* a JavaScript linter. It can be used to check JavaScript in HTML files but it won't lint HTML itself. Use one of the available HTML checkers instead: tidy, validator or w3. – romainl Jul 13 '14 at 09:21
  • I tried those, I get abnormal error 26 when using w3. Any idea what could be the reason? – Christoph Jul 13 '14 at 09:56
  • No idea. You should try Syntastic's issue tracker. – romainl Jul 13 '14 at 10:27

1 Answers1

3

According to the docs on syntastic's page: Scrooloose/syntastic, You can install a checker from github called 'HTML Tidy for HTML5. It's question 3.3. Then set the exec variable to point to it.

g:syntastic_html_tidy_exec = 'path/to/html-tidy'

It also says, in that same Q&A, that you can download a java based html checker, run it as a local webserver, and point syntastic at that.

xizdaqrian
  • 716
  • 6
  • 10