Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim compiler file |
| 2 | " Compiler: HTML Tidy |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 3 | " Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au> |
| 4 | " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tidy.vim |
| 5 | " Last Change: 2004 Nov 27 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 6 | |
| 7 | " NOTE: set 'tidy_compiler_040800' if you are using the 4th August 2000 release |
| 8 | " of HTML Tidy. |
| 9 | |
| 10 | if exists("current_compiler") |
| 11 | finish |
| 12 | endif |
| 13 | let current_compiler = "tidy" |
| 14 | |
| 15 | if exists(":CompilerSet") != 2 " older Vim always used :setlocal |
| 16 | command -nargs=* CompilerSet setlocal <args> |
| 17 | endif |
| 18 | |
| 19 | " this is needed to work around a bug in the 04/08/00 release of tidy which |
| 20 | " failed to set the filename if the -quiet option was used |
| 21 | if exists("tidy_compiler_040800") |
| 22 | CompilerSet makeprg=tidy\ -errors\ --gnu-emacs\ yes\ % |
| 23 | else |
| 24 | CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ % |
| 25 | endif |
| 26 | |
| 27 | " sample warning: foo.html:8:1: Warning: inserting missing 'foobar' element |
| 28 | " sample error: foo.html:9:2: Error: <foobar> is not recognized! |
| 29 | CompilerSet errorformat=%f:%l:%c:\ Error:%m,%f:%l:%c:\ Warning:%m,%-G%.%# |