" Example additions to vimrc to check xml tags match up
function! XMLsynCHK()
let winnum =winnr() " get current window number
silent make %
cw 4 " open the error window if it contains error
" return to the window with cursor set on the line of the first error (if any)
execute winnum . "wincmd w"
:redraw!
endfunction
au! BufWritePost *.xml call XMLsynCHK()
au FileType xml,docbk setlocal makeprg=/path/to/doc-base/scripts/xmllint.php
au FileType xml,docbk setlocal errorformat=%m\ in\ %f\ on\ line\ %l
" Example additions to vimrc to check xml tags match up function! XMLsynCHK() let winnum =winnr() " get current window number silent make % cw 4 " open the error window if it contains error " return to the window with cursor set on the line of the first error (if any) execute winnum . "wincmd w" :redraw! endfunction au! BufWritePost *.xml call XMLsynCHK()
au FileType xml,docbk setlocal makeprg=/path/to/doc-base/scripts/xmllint.php au FileType xml,docbk setlocal errorformat=%m\ in\ %f\ on\ line\ %l