Daniel Stockman wrote:
The reason this doesn't work, sadly, is due to a limitation of the
folding engine. In a nutshell, the "closing" fold needs to be at the
same tab stop as the "opening". In my experience the indenting
behaviour maps fairly consistently with the folding behaviour.
A workaround to make the example fold, and perhaps re-indent properly:
<bar at1="" at2="" at3="" at4=""
at6="" at7="" at8="" at9=""
Less than ideal, I'll grant, but you get used to it.
The issue is that I often use the re-indent command on code that I haven't
written myself, to make it more readable. (It is amazing to me how some
people manage to get any work done on totally badly indented XML files!) So
I don't have the option of putting the /> on a new line.
As a workaround, I changed decreaseIndentPattern to kick in when it finds a
/> on a line where there is no corresponding <. So you would get the
The a3="v3" is not properly aligned with the a2="v2", but at least
remainder of the code around is properly indented. With this updated
decreaseIndentPattern, if you put the /> on a new line, as you suggested,
you also get the correct indentation:
Not ideal, but I think an improvement over the default pattern. Here is the
decreaseIndentPattern = '^\s*(</[^>]+>|-->|--%>|[^<]*/>)';
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:
Sent from the textmate users mailing list archive at Nabble.com