On 2013-06-02 19:48, Steve Litt wrote:
> For one thing, as I type my HTML, it goes into the file as a
> jumble, with inconsistent indentation and no blank line before
> <h1>, <h2> etc headers. Tables aren't sectioned off with
> whitespace.

This sounds a bit like the old joke

  Patient:  Doctor, it hurts when I do this
  Doctor:  Well, don't do that

I don't want to give you too much grief, as for your sake it would be
nice to have your editor meet you where you are.  That said, I find
it much easier to create consistent documents from the start.

> Is there a way to get Vim's indentation better and more
> consistent? If not, is there a program to reformat HTML for easier
> editing?

One of the most common is "tidy" (or "html-tidy")  which is available
on most *nix systems.  On my Debian system, it's just a

  apt-get install tidy{,-doc}

to install it, along with its documentation.  It should be as simple
as using

  :%!tidy

If you don't like the default behavior, there are lots of knobs &
dials you can twiddle to get closer to what you want.

-tim





-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to