[TxMt] Two issues with TextMates and Objective-C
Michael Gregoire
mgee at gwi.net
Tue May 23 18:47:54 UTC 2006
This:
- (id)performMethodWithLongName:(id)foo
and:(id)bar
{
// ...
}
also fixes folding problems that arise when you use:
- (id)performMethodWithLongName:(id)foo
and:(id)bar {
// ...
}
On May 23, 2006, at 2:45 PM, Michael Gregoire wrote:
> For the first mentioned problem, the indentation after the opening
> brace is affected by the brace's location. I find that placing my
> braces in this form:
>
> - (id)performMethodWithLongName:(id)foo
> and:(id)bar
> {
> // ...
> }
>
> fixes any strange indentation issues. Though, it also forces you to
> change your coding style slightly.
>
> This is definitely something that needs to be rectified with
> TextMate though. Programmers shouldn't have to change their coding
> style to suit the application's quirks.
>
> Peace
> Mike
>
>
>
> On May 23, 2006, at 2:38 PM, Greg Miller wrote:
>
>> 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
>>
>> _____________________________________________________________________
>> _
>> For new threads USE THIS: textmate at 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 at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>
More information about the textmate
mailing list