Hi,
I was wondering if it was possible to provide different cino for conditional
statements as opposed to parameters. My current cino is (1s, which gives the
following effects:
void function(
void *param,
void *param2)
{
if (param &&
param2)
{
}
else if (param &&
!param2)
{
}
}
Now this is 66% great, the only thing that is off is the indentation of the
second line of the else if condition. Ideally, it would look like this:
void function(
void *param,
void *param2)
{
if (param &&
param2)
{
}
else if (param &&
!param2)
{
}
}
I've looked through :he cinoptions-values, and I can't identify anything which
would do what I wanted. If I set cino=(0 then again it is 66% correct:
void function(
void *param,
void *param2)
{
if (param &&
param2)
{
}
else if (param &&
!param2)
{
}
}
I suppose what I really want is "(0 if the unmatched parenthesis is the last
non-white character on the line, and (1s otherwise". The same things would be
nice for function calls. These are the two ways I format multiline function
calls, depending the size of the parameters, and the rule I just stated would
work for them, too:
function(foo,
bar);
and
function(
foo,
bar);
Any help would be appreciated; admittedly I only spend a few seconds realigning
the else if parameters, but it'd be nice if it just worked!
--
Max Dyckhoff
AI Engineer
Bungie Studios