all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ken <gebser@mousecar.com>
To: Chris Withers <chris@simplistix.co.uk>
Cc: Emacs Help <help-gnu-emacs@gnu.org>
Subject: Re: pretty-layout in html-mode
Date: Tue, 12 May 2009 05:58:26 -0400	[thread overview]
Message-ID: <4A094842.8090701@mousecar.com> (raw)
In-Reply-To: <4A09414F.2010206@simplistix.co.uk>


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	other threads:[~2009-05-12  9:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12  9:28 pretty-layout in html-mode Chris Withers
2009-05-12  9:58 ` ken [this message]
2009-05-12  9:59   ` Chris Withers
2009-05-12 11:03     ` tomas
2009-05-12 10:57       ` Chris Withers
2009-05-12 11:14         ` tomas
     [not found]       ` <mailman.7058.1242125860.31690.help-gnu-emacs@gnu.org>
2009-05-12 14:58         ` B. T. Raven
     [not found]   ` <mailman.7055.1242122394.31690.help-gnu-emacs@gnu.org>
2009-05-12 10:02     ` Anselm Helbig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A094842.8090701@mousecar.com \
    --to=gebser@mousecar.com \
    --cc=chris@simplistix.co.uk \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.