From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11952 invoked by alias); 5 Sep 2014 15:04:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 11912 invoked by uid 89); 5 Sep 2014 15:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mailout1.w1.samsung.com Received: from mailout1.w1.samsung.com (HELO mailout1.w1.samsung.com) (210.118.77.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (DES-CBC3-SHA encrypted) ESMTPS; Fri, 05 Sep 2014 15:04:02 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NBF00LNWONHR6B0@mailout1.w1.samsung.com> for gcc-patches@gcc.gnu.org; Fri, 05 Sep 2014 16:06:53 +0100 (BST) Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 68.2D.15956.ED0D9045; Fri, 05 Sep 2014 16:03:58 +0100 (BST) Received: from [106.109.9.145] by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NBF001LEOIL8O20@eusync3.samsung.com>; Fri, 05 Sep 2014 16:03:58 +0100 (BST) Message-id: <5409D0EA.2050709@samsung.com> Date: Fri, 05 Sep 2014 15:04:00 -0000 From: Yury Gribov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-version: 1.0 To: Richard Biener Cc: GCC Patches , Laurynas Biveinis , Jeff Law Subject: Re: Vimrc config with GNU formatting References: <540863C1.4000909@samsung.com> In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00494.txt.bz2 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 differences seem to boil down to 1) your config uses autoindent (mine does cindent) 2) my (well, Laurynas's) cinoptions additionally include >4,:2,=2,h2,+2,u0,w1,m1 3) your config sets tabstop whereas mine uses softtabstop 4) formatoptions cause autowrapping of comments at 80-th column I'm not sure about 1), but 2) allows: * case labels start under parent { * correct indent on line break (should be 2, not 4) which seem to match current GCC style. Also due to 3) issuing a tab expands to 2 spaces instead of real tab which is probably a Good Thing. Your settings beat mine at m1 though - it should be removed to allow vim to match closing ) with opening. So I'd say that in general proposed patch handles more cases (with removed m1). -Y