help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pretty-layout in html-mode


From: ken
Subject: Re: pretty-layout in html-mode
Date: Tue, 12 May 2009 05:58:26 -0400
User-agent: Thunderbird 2.0.0.0 (X11/20070326)

On 05/12/2009 05:28 AM Chris Withers wrote:
> Hi All,
> 
> In html-mode, how can I get the html layed out out sensibly?
> (ie: I'm starting off with a file that has weird tabbing, spacing, etc,
> all over the place and I want it all normalised)
> ....

Using html-helper-mode, doing C-i properly indents the current line.  So
 in such files I start with the point on the first line, do C-i, then do
the same on the second line, and so on.  This of course doesn't work if
all the html code is on one line.  The tags and text you want to indent
properly must lie at the beginning of a new line (optionally with some
white space preceding it); that is, C-i won't insert newlines at proper
locations.  ("Proper location" is not an objective determination
anyway.)  But html-helper-mode does understand opening and closing tags
and (normally) indents these at the same level.

hth,
ken





reply via email to

[Prev in Thread] Current Thread [Next in Thread]