2009/3/11 Gary Johnson <[email protected]>:
>
> 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.

That was certainly the impression I got from reading the help on
cinoptions-values.  I guess I was hoping that there would be a way to
change the indenting when the closing brace is on the same line as the
opening brace (much like the way the case statement is realigned when
you add a ':' on the end of the line).

> His indentation of opening braces is inconsistent.

Yes, but it's clearer (to me) than

for (;;)
{CallFunction();}

Al

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to