Re: Vimrc config with GNU formatting

2014-09-07 Thread Segher Boessenkool
On Sun, Sep 07, 2014 at 08:18:39AM +0400, Yuri Gribov wrote: > >> Hm, isn't it already enabled by default for Emacs (in .dirs-local.el)? > > > > That may well be. But Vim is not Emacs. > > Why is Vim special? Because you are changing the editor behaviour for Vim users. Duh. > > This all should

Re: Vimrc config with GNU formatting

2014-09-06 Thread Yuri Gribov
On Sun, Sep 7, 2014 at 8:18 AM, Yuri Gribov wrote: > Replying to all this time. > > On Sat, Sep 6, 2014 at 11:35 PM, Segher Boessenkool > wrote: >>> Hm, isn't it already enabled by default for Emacs (in .dirs-local.el)? >> >> That may well be. But Vim is not Emacs. > > Why is Vim special? As a d

Re: Vimrc config with GNU formatting

2014-09-06 Thread Yuri Gribov
Replying to all this time. On Sat, Sep 6, 2014 at 11:35 PM, Segher Boessenkool wrote: >> Hm, isn't it already enabled by default for Emacs (in .dirs-local.el)? > > That may well be. But Vim is not Emacs. Why is Vim special? As a developer I'd prefer the unified approach: either nuke both or mov

Re: Vimrc config with GNU formatting

2014-09-06 Thread Segher Boessenkool
On Sat, Sep 06, 2014 at 03:38:31PM +, Yury Gribov wrote: > Segher Boessenkool kernel.crashing.org> writes: > > On Fri, Sep 05, 2014 at 07:10:02PM +0400, Yury Gribov wrote: > > > Now I don't quite like the idea of plugin: > > > > Anything that will make this enabled automatically will meet a l

Re: Vimrc config with GNU formatting

2014-09-06 Thread Trevor Saunders
On Sat, Sep 06, 2014 at 03:38:31PM +, Yury Gribov wrote: > Segher Boessenkool kernel.crashing.org> writes: > > On Fri, Sep 05, 2014 at 07:10:02PM +0400, Yury Gribov wrote: > > > Now I don't quite like the idea of plugin: > > > > Anything that will make this enabled automatically will meet a l

Re: Vimrc config with GNU formatting

2014-09-06 Thread Yury Gribov
Bernhard Reutner-Fischer 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 GC

Re: Vimrc config with GNU formatting

2014-09-06 Thread Yury Gribov
Segher Boessenkool kernel.crashing.org> writes: > On Fri, Sep 05, 2014 at 07:10:02PM +0400, Yury Gribov wrote: > > Now I don't quite like the idea of plugin: > > Anything that will make this enabled automatically will meet a lot of > resistance. Make something nice for contrib/ instead? Hm, isn

Re: Vimrc config with GNU formatting

2014-09-05 Thread Segher Boessenkool
On Fri, Sep 05, 2014 at 07:10:02PM +0400, Yury Gribov wrote: > Now I don't quite like the idea of plugin: Anything that will make this enabled automatically will meet a lot of resistance. Make something nice for contrib/ instead? Segher

Re: Vimrc config with GNU formatting

2014-09-05 Thread Bernhard Reutner-Fischer
On 5 September 2014 17:10, Yury Gribov 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 gl

Re: Vimrc config with GNU formatting

2014-09-05 Thread Yury Gribov
On 09/05/2014 12:22 AM, Bernhard Reutner-Fischer wrote: Not sure from whom i borrowed this, perhaps even from you richi, but the gcc_style.vim pasted in the mail below seems to be floating around ;) https://gcc.gnu.org/ml/gcc-patches/2012-12/msg01228.html Nice! Interestingly enough this gives

Re: Vimrc config with GNU formatting

2014-09-05 Thread Yury Gribov
On 09/04/2014 05:22 PM, Richard Biener wrote: 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 Ah, the vimfu. So the differe

Re: Vimrc config with GNU formatting

2014-09-04 Thread Bernhard Reutner-Fischer
On Thu, Sep 04, 2014 at 03:22:15PM +0200, Richard Biener wrote: > 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 > > t

Re: Vimrc config with GNU formatting

2014-09-04 Thread Richard Biener
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 > bo