dy@mtgzx.att.com (D Yip) (10/16/90)
I have been trying to use the different available parameters in ctext
to control the behavior of indentation. I would like to set up the
switch indentation parameters so that the below indentation is achieved
with switch and case statements.
switch (a)
{
case 'a':
/* comment */
case 'b':
/* comment */
}
I added the the below line to my .ezinit as stated in the ctext.help.
addfiletype .c ctext
"ctext-switch-level-indent=4;ctext-switch-label-undent=4"
My understanding is that this should get me the above indentation. What
I have noticed instead is that after the first case statement (case
'a'), the case 'b' starts to indent to the left, beyond the switch. In
fact, I noticed the indentation for switch and case statements will not
work period if ctext-switch-level-indent is NOT double the amount of
ctext-switch-label-undent parameter.
I tried looking at the code (ctext) where the indentation is done. I
had a tough time trying to understand it. Thus I couldn't even try to
fix it. Is there anyone out there who can help me out??
thanks,
David K. Yip (dy@mtgzx.att.com)
(201) 957-5544
AT&T Bell Laboratories
MT 3E-437, 200 Laurel Ave
Middletown, NJ 07748