[TxMt] Indentation bug?

Andrew Hanna percyhanna at gmail.com
Mon Sep 19 17:11:58 UTC 2011


I'm having some issues with indentation.  I'm trying to tweak the indentation for my code, but the rules I'm applying are having some odd effects.

If I manually type in the code, everything indents as expected.  It works perfectly.

However, if I use the "Indent Selection" command (Opt+Cmd+[), it messes up all of the indentation.  Looking through the indentation rules stack, I could not find a regex that might be causing it to behave like it is.

The indentation centers around some basic array syntax in PHP:

$bla = array(
    array(
        1 => 2,
        array(
        ),
    ),
);

This is the output if I type in the code manually.  However, if I auto-indent the code, it turns out like this:

$bla = array(
array(
    1 => 2,
array(
),
),
);

Thanks for any help.

-Andrew


More information about the textmate mailing list