From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19730 invoked from network); 5 Mar 2021 16:51:49 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 5 Mar 2021 16:51:49 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id BD2539CAA2; Sat, 6 Mar 2021 02:51:45 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 055A39CA6A; Sat, 6 Mar 2021 02:51:32 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 225199CA6A; Sat, 6 Mar 2021 02:51:31 +1000 (AEST) X-Greylist: delayed 467 seconds by postgrey-1.36 at minnie.tuhs.org; Sat, 06 Mar 2021 02:51:30 AEST Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by minnie.tuhs.org (Postfix) with ESMTPS id 5E8F49CA68 for ; Sat, 6 Mar 2021 02:51:30 +1000 (AEST) Received: from sdf.org (IDENT:sj@sverige.freeshell.org [205.166.94.5]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 125GhgPA029383 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 5 Mar 2021 16:43:42 GMT Received: (from sj@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 125Ghfqr014924; Fri, 5 Mar 2021 11:43:41 -0500 (EST) Message-Id: <202103051643.125Ghfqr014924@sdf.org> Date: Fri, 05 Mar 2021 11:43:41 -0500 To: will.senn@gmail.com, tuhs@minnie.tuhs.org References: In-Reply-To: User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [TUHS] tabs vs spaces - entab, detab X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Scot Jenkins via TUHS Reply-To: Scot Jenkins Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Will Senn wrote: > OK. So, I've been trying to decide (for the last time, I swear) whether > to use tabs or spaces in my code... Personally, I prefer: * hard tabs, which display as 8 spaces * 80 column wide text windows * "if your code is marching off the right side of the screen, your logic is probably too complex". The beauty of hard tabs is that the person viewing the code can choose how to display them in their editor. If everyone indents with the Tab character, the problem goes away. SVR4 vi, BSD nvi, and vim all support the tabstop option: tabstop (ts) 8 Defines number of spaces that a [TAB] indents during editing session. (Printer still uses system tab of 8.) If you prefer 2 space indentation, in vi(1) do ":set ts=2". If you prefer 4 space indentation, in vi(1) do ":set ts=4". ... Set your preferred default in ~/.exrc, ~/.nexrc, ~/.vimrc ... set ts=N to do this automatically. I'm sure other editors have a similar setting. Using the Tab key also eliminates the issues in makefiles. scot