[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Block as method parameter indentation in objc-mode
From: |
juha . nieminen |
Subject: |
Block as method parameter indentation in objc-mode |
Date: |
Mon, 25 May 2015 11:02:14 -0700 (PDT) |
User-agent: |
G2/1.0 |
Is there an easy way in objc-mode to make a starting { symbol that appears in a
method parameter to be indented only one space more than the starting [ of the
method call? In other words, I want it to indent like this:
[someObj someMethodTakingABlock: ^()
{
// some code here
}];
Likewise, if possible, the ^(...) part also ought to be indented like that if
it's on its own like. So like:
[someObj someMethodTakingABlock:
^(int someValue, NSString* someString)
{
// some code here
}];
Currently objc-mode indents such blocks waaaay to the right, which is rather
impractical.
If there happened to be more parameters after that, they ought to be indented
as normal. In other words, overall, like this:
[someObj someParameter: aValue
aBlock: ^()
{
// some code
}
aThirdParameter: anotherValue];
- Block as method parameter indentation in objc-mode,
juha . nieminen <=