🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #1764

Re: destructive backspace on vi

#1764
From: paul.s.r.chisholm
Date: Tue, 04 Sep 1990 02:33
41 lines
2799 bytes
In article <1990Aug30.224234.19582@ecst.csuchico.edu>, dbar@csuchico.edu (David Barrett) writes:
> When I use a screen editor, I like a "destructive backspace" (you
> back up and the character under the cursor disappears).  Previous
> versions of vi that I have used (on AT&T [systems] for example) have
> had this feature, I think. . . .  [In my current version,] backspace
> apparently is nondestructive and can't be altered by ordinary
> users.

Every version of vi I've used has a non-destructive backspace, both in
input mode, and when editing text on the bottom line in "colon" mode.
In fact, the documentation lists this as a feature, "so you can see
what you had typed" (or words to that effect).  (Also, destructive
backspace when inserting can be quite demanding, depending on how your
terminal does such things.  Yes, I know, every PC editor in the world
does this.  PC video access and UNIX(R) system terminal access aren't
the same; and if you want details or argument on this point, please use
e-mail.)  Your sysadmin is correct:  you'd need access to the source
code to change this.

> All the vi literature I have read says that the erase function can
> be linked to the key of your choice with the command "stty erase
> [char]" . . . .  I do this on [my] system and I get a destructive
> backspace for commands from the login shell mapped to the key of my
> choice.  Likewise for the ex editor.  But in vi, d.b.s. is against
> the rules.  Why is this?

Because full screen applications don't let the tty driver do such
handling; they do it themselves.  In fact, vi treats both backspace and
your current erase character (when you enter vi) as non-destructive
backspaces.  It does not, however, honor or reproduce the effect of the
"echoe" bit.

Paul S. R. Chisholm, AT&T Bell Laboratories
att!mtunq!psrc, psrc@mtunq.att.com, AT&T Mail !psrchisholm
I'm not speaking for the company, I'm just speaking my mind.
UNIX is a registered trademark of UNIX System Laboratories, Inc.,
a subsidiary of AT&T.

(P.S.:  Yes, comp.editors would be a better place to discuss this.
I've e-mailed the original author this reply, and moved discussion to
the editors newsgroup.)
Technical Details
Message-ID: <1990Sep4.023335.28883@cbnewsl.att.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsl!psrc
References: <1990Aug30.224234.19582@ecst.csuchico.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsl!psrc
From: psrc@cbnewsl.att.com (paul.s.r.chisholm)
Newsgroups: comp.text,comp.editors
Subject: Re: destructive backspace on vi
Summary: Confucius says, "forget it; it's not a bug, it's a feature:-)"
Message-ID: <1990Sep4.023335.28883@cbnewsl.att.com>
Date: 4 Sep 90 02:33:35 GMT
References: <1990Aug30.224234.19582@ecst.csuchico.edu>
Reply-To: psrc@mtunq.att.com (Paul S. R. Chisholm)
Followup-To: comp.editors
Distribution: usa
Organization: AT&T Bell Laboratories
Lines: 41