On 2009-03-10, Ben Fritz wrote:
> On Mar 10, 10:02 am, "A. S. Budden" <[email protected]> wrote:
>
>
> > I was wondering whether it is possible to make a (minor) change to the
> > indent style used for C code. Generally I like the style and I don't
> > want to change much. The only exception that I'd like to add is such
> > that the following code is indented as shown (I've changed tabs to
> > spaces for email readability):
> >
>
> C code indentation is controlled by the 'cindent' option.
>
> The behaviour of 'cindent' is controlled by 'cinoptions'
>
> See the :help for each of these options and the links included
> therein, and you should be able to figure something out without ever
> leaving Vim.
I don't think there's any way to use those options to do what he
wants to do, though. His indentation of opening braces is
inconsistent.
for (;;)
{
/* This is indented correctly: I don't want to change this */
CallFunction1();
CallFunction2();
}
for (;;)
{CallFunction();} /* This is what I'd like to support for single
lines with open and close braces */
Regards,
Gary
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---