Vimrc config with GNU formatting

Richard Biener
Thu Sep 4 13:22:00 GMT 2014

On Thu, Sep 4, 2014 at 3:06 PM, Yury Gribov <> wrote:
> Hi all,
> This patch adds a Vim config (.local.vimrc) to root folder. This would allow
> automatic setup of GNU formatting for C/C++/Java/Lex files in GCC (similar
> to what we already have for Emacs via .dir-locals.el). The formatting is
> borrowed from
> Ok to commit?

For some reason I use

set shiftwidth=4
set tabstop=8
set autoindent
set cinoptions={.5s,g0,p5,t0,(0,^-0.5s,n-0.5s

I note some differences to your

+  setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
+  setlocal shiftwidth=2

Not that I can parse any of the above without looking up vim docs ;)


> -Y

More information about the Gcc-patches mailing list