This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Vimrc config with GNU formatting


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]