From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24630 invoked by alias); 19 Sep 2014 11:11:13 -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 24618 invoked by uid 89); 19 Sep 2014 11:11:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 19 Sep 2014 11:11:10 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id s8JBAwrP014772; Fri, 19 Sep 2014 06:10:59 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id s8JBAvnW014769; Fri, 19 Sep 2014 06:10:57 -0500 Date: Fri, 19 Sep 2014 11:11:00 -0000 From: Segher Boessenkool To: Yury Gribov Cc: GCC Patches , Laurynas Biveinis , Jeff Law , Richard Biener , Bernhard Reutner-Fischer , Trevor Saunders , Mike Stump Subject: Re: [PATCHv4] Vimrc config with GNU formatting Message-ID: <20140919111057.GA13688@gate.crashing.org> References: <540863C1.4000909@samsung.com> <54100735.5040700@samsung.com> <541867A2.6020405@samsung.com> <5419C01C.2040404@samsung.com> <20140918035233.GB24532@gate.crashing.org> <541A9A68.7050000@samsung.com> <20140918172003.GA28595@gate.crashing.org> <541BAE58.4050600@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <541BAE58.4050600@samsung.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg01619.txt.bz2 On Fri, Sep 19, 2014 at 08:17:28AM +0400, Yury Gribov wrote: > > I was talking about mbr's plugin here :-) > > Ah, ok. Then I'll mention thinca's plugin as a secondary option with a > disclaimer then. Why? There are more plugins that also do the same thing, all more popular (on vim.org at least), all less dangerous (well, many are probably just as bad :-( ). > > I was suggesting you could write it as > > :set cino=>4,n-2,{2,^-2,:2,=2,g0,f0,h2,p4,t0,+2,(0,u0,w1,m0 > > and you'd be independent of sw setting. > > ... > > And yeah sw=2 does make sense for editing GCC, if you are used to sw=2 > > that is. The point is that the sw setting has nothing to do with what > > your text will look like, only with what keys you press. > > Depending on whether you treat shiftwidth as "amount of spaces that is > inserted when I press >" or "default indent for a particular class of > files". For example with shiftwidth=2 user could (un)indent block of C > code with < or > which seems to be useful. Vim treats it as the former (it has no concept of the latter). cindent uses it too, for that "s" thing, but you do not have to use it here anyway since our coding standard requires two spaces so we can just hardcode that in cino; and in that case, a user can use any sw he wants / is used to. Using "s" in cino is useful if you want the layout to change if you change the shiftwidth. But we don't. Segher