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

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

Need help customizing "TAB" for HTML


From: Angela Bellavance
Subject: Need help customizing "TAB" for HTML
Date: Thu, 25 Jan 2007 18:21:07 -0600
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Hello,

I am using emacs to create HTML documents and am getting frustrated with the default settings for TAB. When I type TAB to indent a line, it always seems to add at least two spaces more than the indent on the previous line. This occurs even when the previous line contains only one tag that does not have a matching closing tag. I would prefer that TAB would line up under the start of the previous line unless I have left a tag open. Ideally this would happen even if I manually adjust where the previous line is indented to.

Here's an example. Here's what it looks like when I use the default TAB in HTML-mode on the following text:

<html>
  <head>
  </head>
  <body bgcolor="#ffff99">
    <h1>Shift Guide</h1>
      <i>Most Recent Update:</i><br>
        <i>$Author: bellavan $</i><br>
          <i>$Revision: 1.59 $</i><br>

I would like it to look like this:

<html>
  <head>
  </head>
  <body bgcolor="#ffff99">
    <h1>CDF SAM Shift Guide</h1>
    <i>Most Recent Update:</i><br>
    <i>$Author: bellavan $</i><br>
    <i>$Revision: 1.59 $</i><br>

Or even better, this:

<html>
<head>
</head>
<body bgcolor="#ffff99">
  <h1>CDF SAM Shift Guide</h1>
  <i>Most Recent Update:</i><br>
  <i>$Author: bellavan $</i><br>
  <i>$Revision: 1.59 $</i><br>

where I have manually moved the tag "<head>" back to the beginning of the line and used TAB to align the rest of the lines.

Does anyone have any suggestions?

Thanks!
Angela




reply via email to

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