On 25-Apr-2011 Zvezdan Petkovic <[email protected]> wrote:
> #v+
> static void
> func(int a
> #if defined(FOO)
> , int b
> , int c
> #endif
> )
> {
> }
> #v-
>
> Even the OP's style indents as he expects with cinoptions=(0,t0
>
>
> So, the issue here is the style of return type indentation.
> If OP wants the indenting as shown above, then he needs to use "t0" in
> the cinoptions.
>
> I was just pointing out that OP's use of "ts" required Vim to indent
> that way. It indented the return type by a shiftwidth ("ts") and
> aligned the content in parentheses as requested by "(0".
> IOW, Vim behaved as requested.
Thanks for analysing the issue so thoroughly.
To make the example simpler and avoid further discussions whether my
coding style is correct or not, the real issue was with the following
piece of code (which follows the coding style assumed during the
development of Vim):
#v+
/* comment */
void
func(int a
#if defined(FOO)
, int b
, int c
#endif
)
{
}
#v-
which looks much better when indented as follows:
#v+
/* comment */
void
func(int a
#if defined(FOO)
, int b
, int c
#endif
)
{
}
#v-
While after applying my patch Vim's behaviour is still imperfect, I'd
argue that it's better.
With regard to the placement of the comma, in the sources of Vim there
are 312 places where the comma is the first non-space character on the
line.
--
Cheers,
Lech
--
You received this message from the "vim_dev" 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