Hello.
I don't know who is responsible for the indentation of Perl buffers (textmate author or bundle author?) but there is a problem with structures of the kind:
### my $teste; $sth_comments->bind_columns( undef, $journalid, $jtalkid ); my $teste2; ###
This is correctly indented, according to the Text->Indent Selection command.
But I was expecting this:
### my $teste; $sth_comments->bind_columns( undef, $journalid, $jtalkid ); my $teste2; ###
Regards, André Cruz
On 10. May 2007, at 17:31, André Cruz wrote:
I don't know who is responsible for the indentation of Perl buffers (textmate author or bundle author?) but there is a problem with structures of the kind: [...]
The indentation system is explained here: http://macromates.com/ textmate/manual/appendix#indentation_rules
Updating the Perl patterns to those of C would at least fix your reported problem, but might introduce others.
I’ll gladly help some Perl programmer adjust the patterns to Perl, but I know too little Perl myself to do proper patterns for Perl indentation.
On 2007/05/11, at 10:20, Allan Odgaard wrote:
The indentation system is explained here: http://macromates.com/ textmate/manual/appendix#indentation_rules
Updating the Perl patterns to those of C would at least fix your reported problem, but might introduce others.
I’ll gladly help some Perl programmer adjust the patterns to Perl, but I know too little Perl myself to do proper patterns for Perl indentation.
I can see that the C scope has the Identation Rules preference setting, but Perl does not. Where do the languages that don't have this defined get their indentation rules?
Regards, André Cruz
On 11. May 2007, at 11:45, André Cruz wrote:
On 2007/05/11, at 10:20, Allan Odgaard wrote:
The indentation system is explained here: http://macromates.com/ textmate/manual/appendix#indentation_rules
Updating the Perl patterns to those of C would at least fix your reported problem, but might introduce others.
I’ll gladly help some Perl programmer adjust the patterns to Perl, but I know too little Perl myself to do proper patterns for Perl indentation.
I can see that the C scope has the Identation Rules preference setting, but Perl does not. Where do the languages that don't have this defined get their indentation rules?
In that case, they would inherit the default patterns likely in the Source bundle, and if there are none, TM has some hardcoded defaults.
Basically the defaults just increase/decrease indent when seeing brackets.
On 2007/05/11, at 10:47, Allan Odgaard wrote:
I can see that the C scope has the Identation Rules preference setting, but Perl does not. Where do the languages that don't have this defined get their indentation rules?
In that case, they would inherit the default patterns likely in the Source bundle, and if there are none, TM has some hardcoded defaults.
Basically the defaults just increase/decrease indent when seeing brackets.
Since Perl has no specific config, can't you just copy C's for now? It's better than the current config...
Also, regarding the Tidy command on the Perl bundle, it works on the file rather than the buffer and does not mandate that the file be saved. Also it doesn't deal well with UTF8 chars on the output of perltidy. I altered the command to:
perltidy -q 2> /dev/null
Input-> Entire document Output -> Replace document
I would send the plist but what was stored on my homedir was just a delta...
As long as I have your attention, is there a workaround for people like me that edit projects remotely via sshfs and every-time the textmate window gains focus it freezes for up to 5s? sshfs is the perfect companion to textmate, even version control works remotely but the delay makes it unusable.
Thanks, André Cruz
On 11. May 2007, at 16:43, André Cruz wrote:
Basically the defaults just increase/decrease indent when seeing brackets.
Since Perl has no specific config, can't you just copy C's for now? It's better than the current config...
I can copy the one from C, but do you think that is better?
For example C will indent after for, while, etc. w/o braces, but I don’t think that should be the case in Perl.
You can always duplicate the Indentation preferences (from the C bundle), change the scope selector to source.perl, and let me know if it works out well, then I’ll make the change to the default bundle.
Also, regarding the Tidy command on the Perl bundle, it works on the file rather than the buffer and does not mandate that the file be saved. Also it doesn't deal well with UTF8 chars on the output of perltidy. I altered the command to: [...]
I think Ciaren will update this command with one that works on the buffer (rather than the file).
As long as I have your attention, is there a workaround for people like me that edit projects remotely via sshfs and every-time the textmate window gains focus it freezes for up to 5s? sshfs is the perfect companion to textmate, even version control works remotely but the delay makes it unusable.