This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Vimrc config with GNU formatting
- From: Yury Gribov <tetra2005 at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 6 Sep 2014 16:32:55 +0000 (UTC)
- Subject: Re: Vimrc config with GNU formatting
- Authentication-results: sourceware.org; auth=none
- References: <540863C1 dot 4000909 at samsung dot com> <CAFiYyc3j-enc0mtotgeMLC=n2ShgBLrLQtNLdXNp35_+1dVmzQ at mail dot gmail dot com> <20140904202254 dot GA24681 at nbbrfq dot cc dot univie dot ac dot at> <5409D24A dot 2040805 at samsung dot com> <CAC1BbcQxr97AK--aiEdrGkhf+fNOT1_oFp5HpqffGVPx4is9zA at mail dot gmail dot com>
Bernhard Reutner-Fischer <rep.dot.nop <at> gmail.com> writes:
> > * gcc_style.vim enables GNU style globally, for all projects
>
> How come? Please explain?
My understanding was that maybe_gcc_style gets run on all opened files and
this could cause problems with non-GCC projects. But given that you check for
GCC comment it's probably not an issue.
> > 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.
Yeah, and we'll also want GNU coding style in GCC runtime libs (libbacktrace,
etc.) so filtering may get quite messy.