jed-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: c_mode_hook configuration


Peter Karlsson <peter@xxxxxxxxxxxxxxxx> wrote:
>Their coding standard mandates this:
>
> int main()
> {
>    if ( foo )
>       {
>       bar();
>       }
>    else
>       {
>       baz();
>       }
>
>    switch ( foo)
>       {
>       case 1:
>           foo();
>           break;
>       }
> }
>
>I have currently set this, which almost works, except that I get an
>extra indentation between the if-braces and the contents (yes, I do
>think it looks horrible), which I can't figure out how to get rid of.

It looks like simple indented text.  I believe the latest development
version of jed (0.99.19-112, which you can get from its SVN
repository) can handle this.  If you install it, then try the following in
your .jedrc file:

   variable C_INDENT = 0;
   variable C_BRACE = 3;
   variable C_BRA_NEWLINE = 1;
   variable C_CONTINUED_OFFSET = 4;
   variable C_Colon_Offset = -3;
   variable C_Class_Offset = 4;
   variable C_Namespace_Offset = 4;
   variable C_Switch_Offset = 3;
   variable C_Macro_Indent = 4;
   variable C_Outer_Block_Offset = 3;

Thanks,
--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]