After a lot of searching and trying I found this to make my tidy work with vim:
:set makeprg=tidy\ -e\ --gnu-emacs\ yes
:set shellpipe=2>
:set errorformat=%f:%l:%c:\ %m
:make %
:copen
But why does the output in the quickfix window has an ^M
unix line-break at the end of every line?
I tried to remove it but the content in quickfix window is not modifiable.
I tried also to make tidy correct the errors, but only the errors.
I created this:
let errorf = "d:\\error.txt"
let currentf = expand("%:p")
let writef = "d:\\".expand("%:t:r")."_tidy.".expand("%:e")
exe a:type."!tidy -w 0 -f ".errorf." -o ".writef." ".currentf
exe ":bot split ".writef
exe ":bot split ".errorf
But this changes the complete output of my file. I want to correct only the errors. I have read the manual of tidy but can't find a simple option to correct only the errors without changing the rest of the file. p.e.
<h1>test</h2> --> <h1>test</h1>
Are there tidy users who know how to change only the errors in tidy?