Vimrc config with GNU formatting

Bernhard Reutner-Fischer rep.dot.nop@gmail.com
Fri Sep 5 16:46:00 GMT 2014


On 5 September 2014 17:10, Yury Gribov <y.gribov@samsung.com> wrote:

> Now I don't quite like the idea of plugin:
> * .local.vimrc setting is more compatible with what we already have for
> Emacs
> * gcc_style.vim won't work for new files (it requires GCC license agreement)

true

> * gcc_style.vim enables GNU style globally, for all projects

How come? Please explain?
>
> IMHO localrc plugin is widespread enough that we can rely on it.

Sure.
>
>> This automatically applies the "gcc style" if the first 25 lines of the
>> file being opened contains the syndicated "This file is part of GCC" so
>> should transparently not set GNU style on foreign stuff like sanitizer.
>
>
> But as I mentioned also disables formatting for all new files.

Yes, you could if match(expand('%:p:h'), "gcc") != -1
or something like that but that's not pretty and robust either.

So I suppose the localrc idea is fine

cheers,



More information about the Gcc-patches mailing list