[TxMt] Two issues with TextMates and Objective-C
Greg Miller
unixjunkie at mac.com
Tue May 23 18:38:18 UTC 2006
I just started using TextMate about a week ago, and so far I love it. But I
write a lot of Objective-C and I see two issues that may get annoying fast.
I'd love to hear if anyone is aware of a fix or if I'm just overlooking
something.
Problems:
1) If I write an method implementation that looks like:
- (id)performMethodWithLongName:(id)foo
and:(id)bar {
// ...
}
The autoindent on the first line of the method body is messed up. I have my
editor set to use "Soft Tabs: 2", but I don't end up two spaces from the left
margin, rather I end up two spaces after the column where the "and:" method
parameter started. It looks like the autoindent spacing is determined by the
location of the preceding line, but I'm not sure this will work well with the
common spacing patterns used in Objective-C.
2) When I call an Objective-C method, I'd like it to automatically align
parameters by the colon. For example, I'd like it to be smart enough to
reformat:
foo = [someObject foo:bar baz:quux];
into...
foo = [obj foo:bar
baz:quux];
I figure this one can be done pretty easily w/ a TM command, but I'm more
wondering if anyone's already written it.
Thanks,
Greg
More information about the textmate
mailing list