Subscribe

Attribute Indentation

  1. 2002-10-08 14:04:34 PDT
    Hi, I would like to indent my attributes like this:

    <company name="Test"
    id="10"
    owner="TestOwner"/>

    The proportional font might not work very well in this case. Anyway, you get the idea, basically , I want to align the attributes together on the same column. I have been searching thru the web and couldn't find any solution.

    Any help is appreciate,
    Charles
  2. 2002-10-08 14:05:49 PDT
    Oops, the spaces are all removed, so let me try again:

    <company name="Test"
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id="10"/>
  3. 2002-10-13 00:13:03 PDT
    There is no "offical" support for this. But I once stared writing a more flexible indentation code. What you can do is set the undocumented variable sgml-attribute-indent-function to the function sgml-indent-according-to-stag-end.

    (setq sgml-attribute-indent-function 'sgml-indent-according-to-stag-end)
  4. 2002-10-15 07:06:29 PDT
    Oh, dear, I love you. It works! :)
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.