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
On 19 Sep 2011, at 19:11, Andrew Hanna wrote:
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. [...]
I recently revamped the indentation patterns and your example indents as expected using the updated patterns: https://github.com/textmate/php.tmbundle/commit/7e58242d738a7baca1955eedda5e...
On 21 Sep 2011, at 11:10, Allan Odgaard wrote:
I recently revamped the indentation patterns and your example indents as expected using the updated patterns: https://github.com/textmate/php.tmbundle/commit/7e58242d738a7baca1955eedda5e...
Spoke to soon, the decreaseIndentPattern matches ‘();)’ which should be changed to ‘()[;,])’ so that your array closer ‘),’ also decrease indent.
I’ll get it updated.