On 29/03/09 17:02, tommm0 wrote:
>
> On Mar 14, 2:38 pm, Tony Mechelynck<[email protected]>
> wrote:
>> ...
>> The o flag is supposed to only affect the new line created by a
>> Normal-mode o or O command, not by hitting Return in Insert mode --
>> that's the r flag.
>>
>> And if that doesn't work either, check (that file being current)
>>
>>          :verbose set indentexpr? cindent? lisp? smartindent?
>>
>> (and if any of these options is not recognised, try again without it).
>>
>> You might want to try
>>
>>          :setlocal indentexpr=
>>
>> and if that isn't enough;
>>
>>          :setlocal nocindent
>>
>> and if that isn't enough,
>>
>>          :setlmocal nolisp
>>
>> and if that isn't enough,
>>
>>          :setlocal nosmartindent
>>
>> Doing it one option at a time will tell you exactly what was wrong.
>>
>> Best regards,
>> Tony.
>> ...
>>
>
> Hi Ag&  Tony,
>
>    thanks for your advices. So it is the 'cindent' option that causes
> the
> behaviour. Seeing your post, Tony, it struck me immediately.
>    Before that, I had been browsing the chapters on text formatting up
> &  down
> in docs and somehow forgot to think about things like indentation
> mechanisms.
>    So now even writing emails in vim is ok for me :-) But, by the way,
> can you
> see any statement on that behaviour in chapters related to C-
> indenting?
> I didn't find any.
>
> Happy Vimming!
>
> Tom

I'm not sure. Maybe one of the settings in |'cinoptions'|. But an 
increased indent when breaking the line after a comma (when the line 
before that doesn't itself end in a comma) is a fairly standard feature 
in programming languages:

        if (expression) {
                func1(arg1, arg2, arg3,
                        computedarg(subarg1, subarg2, subarg3),
                        arg4, arg5, arg6);
                func2(param1, param2, param3, param4, param5, param6,
                        param7, param8, param9);
        };


Best regards,
Tony.
-- 
Beware of self-styled experts: an ex is a has-been, and a spurt is a
drip under pressure.

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

Reply via email to