From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 839FC3858D33 for ; Thu, 28 Jul 2022 19:53:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 839FC3858D33 Received: by mail-ej1-x634.google.com with SMTP id ez10so4853515ejc.13 for ; Thu, 28 Jul 2022 12:53:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fRWGvwZ8ocGpIMkOFwqK/4dQ8/g8kAaH/BVoQBLZPWY=; b=wSrfViYLjVy2cHA7PirHMkmJfXDhXeYvNlc2HjmNb6yJ2yKll4Dui/tf7EjjMp1V4k lRBSfQ7fA0YIVOjEoqX1DnWMIXn4FFr68IrDet33DmdSBcmnmmX/hNfjMrZag1K0Jt7O PHR2wb5qjYWD0fKv1TMq/+YIib/zF8ZVmzxbCEy0ipHnCKpU/avb1ejbz+DoG2oFs9WG 9PrDxPgnu+mItrOZO65AHkh5MKkdDk6+STlDj2tQyUpZuSPM5i8H++nw0yA9dWIvAFeD RnGbSHYXGoyzt0VM91/nUHQx3YAl5gHIrt95jm2Aezn94rlBmtFrm0Zk0/7ynZ5JvaAG 0Z3A== X-Gm-Message-State: AJIora8rzbgLH+gtoFNlR0O4HMqHwprwUNawpcGkIaHDkOel9DSJ9+0O 2rg2xESk5WoW1atBEf1kVJ+f52bGz9Y/t9Fs30Y= X-Google-Smtp-Source: AGRyM1ud77vZKYfRh/gVWcr19NO3AWgHYn19rUUrseyLtcbIiRYY1H1HqYj+y6rCXuCvLbOFLbAh0/EJ8BBJEMBioOI= X-Received: by 2002:a17:907:6ea7:b0:72f:2cf2:9aef with SMTP id sh39-20020a1709076ea700b0072f2cf29aefmr348598ejc.215.1659038028347; Thu, 28 Jul 2022 12:53:48 -0700 (PDT) MIME-Version: 1.0 References: <2QXQFR.JX7MU9S88TL03@tim-lange.me> In-Reply-To: <2QXQFR.JX7MU9S88TL03@tim-lange.me> From: Jonathan Wakely Date: Thu, 28 Jul 2022 20:53:37 +0100 Message-ID: Subject: Re: Setting up editors for the GNU/GCC coding style? To: Tim Lange Cc: David Malcolm , "gcc@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2022 19:53:51 -0000 On Thu, 28 Jul 2022 at 20:49, Tim Lange wrote: > > > > On Thu, Jul 28 2022 at 02:46:58 PM -0400, David Malcolm via Gcc > wrote: > > Is there documentation on setting up text editors to work with our > > coding style? A lot of the next generation of developers aren't using > > vi or emacs; they's using VS Code, CLion, and other editors. Does > > anyone have docs on e.g. how to set up VS Code, CLion, etc (IntelliJ > > ?) > > to work well on GCC's own code base. FWIW I use Emacs; I've dabbed > > with VS Code but haven't used it "for real". > > I did prepare my first patch(es) with vscode. For debugging, I set up > vscode to launch gcc with gdbserver as wrapper and then let the vscode > debugger to connect to the gdbserver. At first, I tried to get the gnu > coding style to work in the hacky way by using tabSize=8 and rebinding > tab to 2 spaces but later ditched that because it bothered me more than > doing just spaces and replacing 8 spaces with 1 tab before sending the > patch. That still wastes time because all files that I didn't touch > look ugly unless I temporarily change the tabSize and some comments > don't use tabs so I can't just replace all 8 spaces with 1 tab. That's what unexpand(1) is for: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/unexpand.html