Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-15 Thread Yury Gribov
On 09/14/2014 02:30 PM, Alexander Monakov wrote: On Thu, 11 Sep 2014, Yury Gribov wrote: Ok, it tooks some time. Basically we want brace symbol to behave differently in two contexts: 1) not add any additional offset when not following control flow operator: void f () { int x; { } } N

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-14 Thread Alexander Monakov
On Thu, 11 Sep 2014, Yury Gribov wrote: > Ok, it tooks some time. Basically we want brace symbol to behave differently > in two contexts: > > 1) not add any additional offset when not following control flow operator: > void > f () > { > int x; > { > } > } Note that GCC commonly uses custom

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-11 Thread Yury Gribov
On 09/11/2014 02:10 PM, Yury Gribov wrote: On 09/11/2014 01:18 PM, Richard Biener wrote: On Thu, Sep 11, 2014 at 11:06 AM, Richard Biener wrote: >On Wed, Sep 10, 2014 at 10:09 AM, Yury Gribov wrote: >>Hi all, >> >>This is a second version of patch which adds a Vim config (.local.vimrc) >>to r

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-11 Thread Yury Gribov
On 09/11/2014 01:18 PM, Richard Biener wrote: On Thu, Sep 11, 2014 at 11:06 AM, Richard Biener wrote: >On Wed, Sep 10, 2014 at 10:09 AM, Yury Gribov wrote: >>Hi all, >> >>This is a second version of patch which adds a Vim config (.local.vimrc) >>to root folder to allow automatic setup of GNU

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-11 Thread Yury Gribov
On 09/11/2014 01:14 PM, pins...@gmail.com wrote: I don't like auto formatting in any editor. Ok, so +1 for moving to contrib/. And some folks already have to deal with two more formatting styles already: Linux kernel and gnu. So if you add auto formatting to one, some folks are going to get c

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-11 Thread Richard Biener
On Thu, Sep 11, 2014 at 11:06 AM, Richard Biener wrote: > On Wed, Sep 10, 2014 at 10:09 AM, Yury Gribov wrote: >> Hi all, >> >> This is a second version of patch which adds a Vim config (.local.vimrc) >> to root folder to allow automatic setup of GNU formatting for C/C++/Java/Lex >> GCC files. >>

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-11 Thread pinskia
> On Sep 10, 2014, at 9:47 PM, Yury Gribov wrote: > > Segher Boessenkool kernel.crashing.org> writes: >> I am saying it is very anti-social to make >> people's editor behave differently from what they are used to. >> ... >> The Emacs dir-locals file simply >> configures some settings for files

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-11 Thread Richard Biener
On Wed, Sep 10, 2014 at 10:09 AM, Yury Gribov wrote: > Hi all, > > This is a second version of patch which adds a Vim config (.local.vimrc) > to root folder to allow automatic setup of GNU formatting for C/C++/Java/Lex > GCC files. > > I've updated the code with comments from Richard and Bernhard

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-10 Thread Yury Gribov
Segher Boessenkool kernel.crashing.org> writes: > I am saying it is very anti-social to make > people's editor behave differently from what they are used to. > ... > The Emacs dir-locals file simply > configures some settings for files with certain major modes in that dir. > For example, ours say

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-10 Thread Segher Boessenkool
On Wed, Sep 10, 2014 at 12:09:25PM +0400, Yury Gribov wrote: > The patch caused a lively debate with Segher who wanted .local.vimrc to > not be enabled > by default. No, that is not what I said. I am saying it is very anti-social to make people's editor behave differently from what they are used

Re: [PATCHv2] Vimrc config with GNU formatting

2014-09-10 Thread Yury Gribov
> I personally prefer 2) Sorry, I meant 1) of course that is enable vimrc config by default. -Y

[PATCHv2] Vimrc config with GNU formatting

2014-09-10 Thread Yury Gribov
Hi all, This is a second version of patch which adds a Vim config (.local.vimrc) to root folder to allow automatic setup of GNU formatting for C/C++/Java/Lex GCC files. I've updated the code with comments from Richard and Bernhard (which fixed formatting of lonely closing bracket). The patc