On Wed, 3 Feb 2010, Ben Fritz wrote:

> On Feb 3, 9:41 pm, Bee <[email protected]> wrote:
> >
> > I would like a syntax check showing where html source is invalid.
> >
> 
> So, you want to run a command and see a list of all the errors, with 
> line numbers to jump to? This would be the "quickfix" functionality of 
> Vim, see :help quickfix for details. You'd just need to set up your 
> makeprg and errorformat options correctly, probably by finding and 
> using a "compiler" plugin for your particular validator application. A 
> quick web search for "css validator vim quickfix" gave me these:
> 
> http://blog.whatwg.org/vim-checker
> http://wiki.whatwg.org/wiki/IDE
> 
> You may find better ones on your own.

Since it bothered me that that solution required sending the HTML to an 
external site to validate, I googled 'html tidy vim'.  Turns out, 'html 
tidy' support is mostly built-in (see the first comment on the wiki 
entry for 'Cleanup your HTML'[1]).  If you install tidy[2], a minimal 
"see the cool things it can do" example is:

(open some HTML file... then:)

:compiler tidy
:make
:copen

Thanks to Ben F for the jump start.  Hopefully 'tidy' and 'quickfix' 
will pick up the rest.

-- 
Best,
Ben H

[1] http://vim.wikia.com/wiki/Cleanup_your_HTML
[2] http://tidy.sf.net

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to