From owner-freebsd-questions@freebsd.org Thu Jan 2 09:59:22 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 887431F333B for ; Thu, 2 Jan 2020 09:59:22 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47pNmT44QNz4Bxm for ; Thu, 2 Jan 2020 09:59:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.11.148]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPA (Nemesis) id 1M6m5o-1ioZYI3Gf8-008GAa; Thu, 02 Jan 2020 10:59:16 +0100 Date: Thu, 2 Jan 2020 10:59:16 +0100 From: Polytropon To: "Ronald F. Guilmette" Cc: freebsd-questions@freebsd.org Subject: Re: Substituting horizontal tab characters in vi Message-Id: <20200102105916.67956873.freebsd@edvax.de> In-Reply-To: <61189.1577922242@segfault.tristatelogic.com> References: <61189.1577922242@segfault.tristatelogic.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:N42+da3oIgytl7u8AqR10eVNEPjAL4/RrU2BfKJByp8N8Q/OJC+ 4DUacgU3f5OVnEwYsbQMmUvq4ZvMuJ1F/DCEdpelGLafKWhL9Lu1ZaQq0cvD1u4OXuzXZf3 ir7aWv0MAxSapUaYau0WYEG4p+ktxyzUFSyF13CKgdLqrZdvjAm4qtARt7TXZn5fudF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d.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.17.24) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [3.91 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[148.11.222.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.59)[0.593,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.77)[0.772,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[24.17.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[24.17.227.212.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.14)[ip: (-0.34), ipnet: 212.227.0.0/16(-1.17), asn: 8560(2.23), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jan 2020 09:59:22 -0000 On Wed, 01 Jan 2020 15:44:02 -0800, Ronald F. Guilmette wrote: > Yes, I'm a holdout. After all these years I still use vi. Why not? > It works! > > But ever since "upgraded" to 12.0-RELEASE (from 9.1) I have been hitting > my head on one annoying little problem with vi, and I wonder if anyone > can tell me what the fix or workaround is. > > Quiet simply, it used to be possible to use vi to make substitutions for > horizontal tab characters, say for example in the current line, by just > typing : (colon) to get to the vi "command prompt" and then typing "s" > (substitute command) followed by some delimiter, e.g. forward slash, > and then just hitting the tab key on my keyboard, followed by a closing > delimiter and then my substitution text followed by yet another closing > delimiter. > > Now this doesn't work anymore. Now, vi, while in "command mode" won't > even allow me to hit the tab key anymore! It just sits there and blinks > at me as if I hadn't touched the keyboard at all. Funny thing though, > I just now checked and realized that I *can* still get it to perform > substitutions for horizontal tab characters, but I have to go through > some rather silly gyrations in order to even enter the horizontal tab > character. Specifically, I have to type in cntrl-v followed by cntrl-i. I can confirm this on FreeBSD 12.0-p7. Additionally, you can use :s//something/ (i. e., use TAB key instead of Ctrl+I). However, when I use vim or gvim, the old input method (using the _actual_ TAB key without ^V) works as expected, even though the tab "character" itself is displayed as ^I in the replacement rule, which then looks like :s/^I/something/. As I have access to an older FreeBSD system, I can confirm that stock vi of that time supports directly inputting the TAB, which on 12.0 doesn't seem to work anymore. The replacement rule looks like :s/ /something/ (using the TAB key advances the cursor to the next tabstop in the command input area). Sidenote: Both tested in X terminals (classic xterm). > So anyway, is there some way of restoring the old behavior so that I can > go back to just using the tab key in a straiightforward and intutive > fashion? Is using vim an option for you? > P.S. This is not a big problem, but I really do wish that people wouldn't > break standard tools like vi as they are "upgrading" them. Lots of things disimprove or break during upgrading... ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...