[TxMt] Re -indenting XML with tag on multiple lines

Alessandro Vernet avernet at scdi.org
Tue Sep 29 23:30:39 UTC 2009


Consider the following code:

<gaga>
    <bar at1="" at2="" at3="" at4="" at5="" 
        at6="" at7="" at8="" at9="" at10=""/>
    gaga
</gaga>

Re-indenting this gives you the following, which incorrectly doesn't
decrease the indent level after the "/>":

<gaga>
    <bar at1="" at2="" at3="" at4="" at5="" 
        at6="" at7="" at8="" at9="" at10=""/>
        gaga
    </gaga>

Moving all the attributes (at1 to at10) on a single line is a way around the
problem, but when there are a lot of arguments, it sometimes just makes
sense to have the attributes over multiple lines. I imagine that this could
be fixed by tuning the decreaseIndentPattern and increaseIndentPattern for
XML. Has anyone already done that?

Alex

-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet
-- 
View this message in context: http://www.nabble.com/Re-indenting-XML-with-tag-on-multiple-lines-tp25672686p25672686.html
Sent from the textmate users mailing list archive at Nabble.com.




More information about the textmate mailing list