Off topic, but I've seen some strange decisions (or bugs) with the PHP bundle. (e.g. Type php and hit tab - braces are reversed for some reason, maybe intentional?)
I guess not many TM users work with PHP? (Yes, RoR is the way to go - but there are situations that PHP has a faster Time-to-Market so you have no choice.)
Best, Sangwhan
Till Backhaus wrote:
Hi again,
sorry for the non-working example. I have to admit that my example was oversimplified and that the case in which the error occurs is slightly less common than previously indicated.
Now a 'working' example:
<?php if( $whatever ){ doesnt_matter(); } elseif ( $something || $breaking_before_the_second_condition_screws_it_up ) { doesnt_matter_either(); } ?>
should ideally be indented like this:
<?php if( $whatever ){ doesnt_matter(); } elseif ( $something || $a_linebreak_in_this_condition_screws_it_up ) { doesnt_matter_either(); } ?>
also acceptable (i would indent the condition myself):
<?php if( $whatever ){ doesnt_matter(); } elseif ( $something || $a_linebreak_in_this_condition_screws_it_up ) { doesnt_matter_either(); } ?>
but textmate does this:
<?php if( $whatever ){ doesnt_matter(); } elseif ( $something || $a_linebreak_in_this_condition_screws_it_up ) { doesnt_matter_either(); } ?>
reproduce:
- enter the code above in an empty php-document
- select all
- indent selection
cheers, Till Backhaus
Till Backhaus mail: till@backha.us _web: http://till.backha.us
On 12.04.2008, at 17:46, Ciarán Walsh wrote:
Hi,
On 11 Apr 2008, at 07:31, Till Backhaus wrote:
while fixing indentation of a php-file using 'indent selection' i found that textmate is wrong in the following case:
Indenting this code sample worked as expected for me. Please make sure you don’t have any local modifications to the PHP bundle (see http://wiki.macromates.com/Troubleshooting/RevertToDefaultBundles ) ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate