From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 8E9373858D28 for ; Mon, 1 Aug 2022 08:24:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8E9373858D28 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2718G59E014262; Mon, 1 Aug 2022 08:24:22 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hpb60r7es-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Aug 2022 08:24:21 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2718GISk014981; Mon, 1 Aug 2022 08:24:21 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hpb60r7e3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Aug 2022 08:24:21 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2718LUxE023277; Mon, 1 Aug 2022 08:24:19 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03ams.nl.ibm.com with ESMTP id 3hmv98swma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 01 Aug 2022 08:24:19 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2718M5G325690480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Aug 2022 08:22:05 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0D6352054; Mon, 1 Aug 2022 08:24:16 +0000 (GMT) Received: from li-42a4824c-28a0-11b2-a85c-f55c0d5956ce.ibm.com (unknown [9.145.68.147]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 993DD52051; Mon, 1 Aug 2022 08:24:16 +0000 (GMT) Date: Mon, 1 Aug 2022 10:24:15 +0200 From: Stefan Schulze Frielinghaus To: Jonathan Wakely Cc: Tim Lange , "gcc@gcc.gnu.org" Subject: Re: Setting up editors for the GNU/GCC coding style? Message-ID: References: <2QXQFR.JX7MU9S88TL03@tim-lange.me> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: O9curgB-igZq1vx-6u0VmjW_CpfgSCTJ X-Proofpoint-GUID: 6pGw2RrCH03f0qkp71iOk8SuV1VBToTg X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-01_03,2022-07-28_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 impostorscore=0 phishscore=0 clxscore=1011 suspectscore=0 spamscore=0 mlxscore=0 mlxlogscore=823 priorityscore=1501 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2208010038 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, 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: Mon, 01 Aug 2022 08:24:24 -0000 On Thu, Jul 28, 2022 at 08:53:37PM +0100, Jonathan Wakely via Gcc wrote: > 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 I gave unexpand from GNU coreutils 8.32 a try. Looks like it cannot deal with form feeds or maybe I'm missing something? $ bash -c "printf 'foo\n\f\n bar\n'" | unexpand - foo unexpand: input line is too long