steven woody wrote:
On 8/18/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
steven woody wrote:
> i use vim on both linux and windows. but i found their indentation
> behavior a little differently.
>
> say i was coding a c program on the below line
>
> void  foo_fun( int p1
>
> then i press return on linux, the cursor come to a pleasant position,
> that became,
>
> void foo_fun( int p1
>                        , int p2 );
>
> but when i was on windows and do the same thing, it became
>
> void foo_fun( int p1
> , int p2 );
>
> and i dont like that.
>
> i compared .vimrc files on linux and windows, but got nothing.  so i
> am wandering whether someone here got know a setting which helps.
>
> thanks.
>

there are some options which might be relevant, like 'cindent' and
'indentexpr'. You might also want to check ":filetype" (without
arguments) to see if filetype-related indentation is or isn't "on" on
both sides.



yes, filetype command returns different results, in linux it is

filetype detection: ON plugin:ON  indent: ON

but in windows, it is

filetype detection: ON plugin:OFF  indent: OFF

how to fix that?


Best regards,
Tony.




        :filetype plugin indent on
or
        :runtime vimrc_example.vim

(the latter includes the former). If you invoke the vimrc_example, place that near the top of your vimrc, before everything except (if present) setting the ":language".

see ":help :filetype".


Best regards,
Tony.

P.S. I'm no Vim official, just a user like you. Next time, please use "reply to all" rather than "reply to sender" so the list gets it and, if e.g. I've gone to bed, someone else can reply.

Reply via email to