C indentation problem for functions with many parameters (one parameter per line)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

C indentation problem for functions with many parameters (one parameter per line)

Peng Yu
Hi, The following is the indentation results of some C code in vim. Is
there a way to fix this problem?

void f(
    int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
    , int a
, int a
, int a
)

--
Regards,
Peng

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: C indentation problem for functions with many parameters (one parameter per line)

Bram Moolenaar

Peng Yu wrote:

> Hi, The following is the indentation results of some C code in vim. Is
> there a way to fix this problem?
>
> void f(
>     int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
>     , int a
> , int a
> , int a
> )

set cino+=)30

--
hundred-and-one symptoms of being an internet addict:
125. You begin to wonder how often it REALLY is necessary to get up
     and shower or bathe.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.