Re: how to backspace in vi?



Unruh <unruh-spam@xxxxxxxxxxxxxx> wrote:
floyd@xxxxxxxxxx (Floyd L. Davidson) writes:
Unruh <unruh-spam@xxxxxxxxxxxxxx> wrote:
floyd@xxxxxxxxxx (Floyd L. Davidson) writes:
Unruh <unruh-spam@xxxxxxxxxxxxxx> wrote:

I can't figure out what you meant to say there. Regardless,
Emacs does *not* use ^H for backspace, it uses ^B.

No. It uses ^H for help. That is the problem. That meant that emacs users
fought the use of ^H for backspace.

That's as clear as mud.

OK, lets try again.
No, It (Emacs) uses ^H for help. That (Emacs uses ^H for help) is the problem.
That (Emacs uses ^H for help) meant that emacs users fought (were against,
opposed) the use of ^H for backspace.

Is that explication of the referents clarifying?

Self-contradiction is not explication. You should have said:

Yes! You are right about Emacs, but please note that that
necessarily means that Emacs' developers contributed to
the conflicting usage of ^H.

A truth, but not at all what you said.

Originally the VT100 had *no* key at all labeled "Delete" or
"Backspace". Other keyboards typically placed a "Backspace" key
just above the "Return" key. DEC added a key to later versions of
the VT100, but labeled it "Delete". It sent 0x7f, *not* 0x08.

Yes, precisely. And since "backspace " was far more useful in typing than
was delete ( ie removing the letter before the cursor was more useful than
removing the one under the cursor) that key came to be used for backspace,
and the emacs designers, weaned on the VT100, used it as such. They also
decided to use ^H as the help key. This was ok because standards such as
ASCII were for wussies and computers were there to do the bidding of the
hackers, not of users. This of course led to a conflict as soon as PC
rather than vt100 keyboards, which actually followed the standard, became
common. And guess who won out.

I sure wish you would learn to write clearly. I know what you
want to say. The words you have above, if rearranged, could be
used to say it.

However, you have the right facts, but your opinions are based
on invalid conclusions.

What you are saying is that Bill Unruh learned to use a computer
with DOS and/or MS Windows, and thinks that *defines* the right
way to do things. It doesn't, and almost any place where you
apply that logic, you will be wrong.

The (IBM) PC keyboard itself does *not* send ^H when the
<BackSpace> key is pressed. The OS can map keys to virtually
*anything*. DOS got it wrong, because they didn't have enough
sense to copy what others were doing... (Gates was in a rush
to make money, and research was not on his priority list.)

since backspace is far more used than forward delete.

It was a <Delete> key, it sent a DEL character... and you say it
was used for "backspace". A BS is non-destructive, and DEL is
destructive. One is a ^H, the other is ^?.

No. A backspace is destructive as well. It is not the same as "cursor left"
as can be seen from the fact that there is no "cursor right" ascii
standard.

The ASCII character set was developed before the concept of a
"video monitor" existed, and was intended for hard copy
terminals. The "BS" and the "SPACE" signals are cursor left and
cursor right, non-destructive moves. The DEL signal was also
known as "Rubout", and as intended to be destructive for the
data sent not the data displayed. (DEL originated from the use
of paper tape, and was all holes punched, which removed that
character from the tape; on a hard copy terminal technically
should have simply been ignored, but often it overprinted the
cursor location with a box.)

When "glass TTYs" were build, each manufacturer adapted "carriage
control" signals to the capabilities of their product as they saw
fit. Not all of them were the same, obviously. However, it should
be noted that in fact the system used by DEC, primarily with the
VT-100, was the basis for ECMA-48/ISO 6429/ANSI X3.64 standardized
terminal controls. Essentially you are complaining about the
implementation of X3.64 being based on the DEC VT-100 terminal.

Clearly there was a division between people who felt BS should
or should not be destructive. Unix developers, as is not
uncommon, picked what they thought was the best way; Microsoft
did it the quick and easy way. As a result, when Microsoft's
marketing was successful at selling their quick and easy hacks
to millions of people, those people became habituated to
something less than the best.

You are apparently an example of Microsoft's marketing success.

(None of this involves "forward delete".)

We might note that there are *three* different keys being
discussed, and you are apparently confusing all of them!
On a typical PC,

Key Typical Keycode

"typical " what?

My mistake, that is the ASCII output, not the keycode.

I was going to provide a complete chart, but decided not to,
and edited it wrong. Obviously you do need to see the complete
chart:

Key Label on Scancode Scancode Keymapped
Keyboard Press Release Keycode ASCII

Ctrl 0x1d 0x9d 29

H 0x23 0xa3 35 ^H

BackSpace 0x0e 0x8e 14 ^?

Delete 0xe0, 0x53 0xe0, 0xd3 111 ^[[3~

?????? What chart is this? Backspace on a PC keyboard sends out ^H, not ^?

It sends out a scan code, as shown above. If you want, the OS
can cause that to be seen as 0xFE instead of 0x08 or 0x7F.

Del sends out ^? . NOw of course you can translate key presses to ascii in
any way you want. Unfortunately you cannot translate programmers.

The (IBM) PC hardware is *not* restricted to doing things the
way MicroSoft decided.

CNTL H \008

You missed the error above! ;-) \010 or 0x08, not \008.

I did. Just shows how comfortable I am with octal. (who in the world uses
octal anymore?)

Everyone who talks about ASCII codes. Particularly if they use any
kind of masking. (I.e., programmers.)


....
At around the same time the ASCII key encoding was formalised (
in opposition to EBSIDEC of IBM) which defines ^H as backspace. Now these
....

Not to mention that your whole point about ^H was wrong, as
that is *not* what is used in EBCDIC.

??? And I never claimed it was.

It seems your clear as mud writing style has bitten everyone
again. I thought, as did others, that that was exactly what you
meant. I see that you didn't mean to to say that. Okay; thank
you for finally clarifying _something_.

poor babies were discombobulated beacuse they could not live without vi and
could not redefine their help.

Oops, my bad. The poor babies could not live without their emacs, not their
vi.

Oops, you are still blowing smoke. The TECO macros version of Emacs
was started in 1975, GNU Emacs is from 1984. In between there was
a Lisp version in 1978 and a C version first appeared in 1981.

Of course I am blowing smoke.

And it is not appropriate. (Nice of you to admit this is all bullshit
though.)

....

BS, or ^H, or 0x08 is a non-destructive backspace.

^H is backspace, not non-destructive backspace.

Only if you think MicroSoft defines standards.

DEL, or ^?, or 0x7f is a destructive backspace.

Del is "delete the character under the cursor, not the one before the
cursor"

Yes. I'll agree to that as what it originally was, when applied
to paper tape.

Technically, the DEL *signal* should simply be ignored by a display
device. That means the signal generated by the keyboard, and/or any
key labeled with DEL, can do anything the implementation chooses and
still be "correct".

It has been and still is often used as a destructive backspace
when used with video terminals.

You and I are free to disagree on how we should each configure
our keyboard. If one wants the <BackSpace> key to be
destructive and the other does not, that is neither here nor
there. What I object to is your claiming that having the
functionality for both is wrong, and that one way is the only
way. And almost as bad is the imagination you use to generate
"facts" to support that horrible idea!

The problem is NOT that one can define one's keyboard as one wants, the
problem is that different programmers decide that they want to define the
keys as they want. Thus some use ^H, hard coded, as destructive backspace,
and some use ^?, and emacs uses ^H as help, and some use curses, and some use whatever else.

And I fail to see how that is wrong. Any of them can be
configured to *work*.

....
The distributions all use the Unix set of utilities. It has
nothing to do, as such, with Linux. It is Unix, and what it
does is allow the user to select either way.

No, that is my problem. It does NOT allow the user to select either way,
because programmers have hard coded certain incompatible choices into their
programs.

That simply is not true. They are NOT hard coded. Emacs, as
above, is a good example.

card. However, lots of the very low level routines even in the kernel use
^H as backspace.

Name a couple.

Your (lack of) response is accurate... ;-)

Regardless, what has that got to do with whether the <BackSpace>
key should be a non-destructive or a destructive backspace.

A non-destructive backspace is a completely useless extra key, since the
arrow control keys came out. Ie, once one has cursor control, you want
cursor left, right, up, down all together. You do NOT want some key which
duplicates one of those.

Untrue.

Consider a "simple" keyboard: no "function keys". Guess what
those arrow keys are? (Non-existent. And every program should
be designed to work without them.) Yes you can wave your hands
in the air and scream through the cloud of blue smoke that PCs
are everywhere... but they aren't *everywhere*...

When a terminal sends ASCII (i.e., when it is not an attached
console that can use scan codes), arrow keys and other "function
keys" require escape sequences that use precision timing to
differentiate between a manually typed sequence and an escape
sequence. It fails when the keyboard communicates over either a
slow link or a link with high jitter. (Conditions common to
modems and the Internet, respectively.)

Indeed, using *your* logic, the arrow keys are "useless extra"
keys, and should not be there!

Who said anything about removing anything? I was giving a totally biased
history to "explain" why Linux has such a mess for the "destructive
backspace".

Linux does it right. Your concepts are a mess, and your
"biased" descriptions are simply in error.

You are providing false information and giving worthless advice
based on unworkable solutions. Correcting that is necessary.
Others can give advice on how to configure /vi/, which I don't
use. (I will note that with /vim/ on the box I'm writing this
on, all of ^H, the Left Arrow, and <BackSpace> are a
non-destructive backspace. I don't know if there is a
destructive backspace, but the apparent lack of one strikes me
as an impediment for a touch typist.)

Ah, so you have fallen into the trap yourself, and thus rant on without
having any idea of the original poster's problem.

Your set of fabrications would give the OP a much bigger
problem, if not corrected.

The OP has enough trouble without someone blowing smoke to
obscure the path.

vi ( and vim) HAVE a destructive backspace. It is usually tied to the key
above the return key. vim is perfectly useable for a touch typist, if set
up properly, which is what the OP was having trouble with.
And you in your ignorance then state that I am giving worthless advice when
you have no idea whatsoever, as you admit, what you are talking about.

Giggle snort, laugh. Obviously *you* don't have a clue how /vi/
works. If ^H is a non-destructive backspace in /vi/ (which is
not what you say it should be) *and* the key above the <Return>
key is a destructive backspace... then it *clearly* works as
I've described and *not* the way you claim it should! If that
key sends the ^H you say it should, it will be the same as
CTRL-H, which is non-destructive.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx

Why do you quote signature lines????

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx
.



Relevant Pages

  • Re: Great SWT Program
    ... trimming quoted material and spewing nonsense without even thinking ... wrt to understanding what is going on in emacs. ... [snip pointless aside] ... expect enter or backspace to do in various sorts of text input areas. ...
    (comp.lang.java.programmer)
  • Re: Great SWT Program
    ... I never suggested that emacs could replace spreadsheets. ... I thought you were editing the query text at that point. ... backspace deleting the next character to the left would be ... Emacs users want it to happen all the time, ...
    (comp.lang.java.programmer)
  • Re: Great SWT Program
    ... None of the nasty things that you have said or implied about me are at ... my conclusion that backspace is broken in emacs remains unscathed. ... No. You've waffled about whether backspace would always DTRT at the ... modify the query. ...
    (comp.lang.java.programmer)
  • Re: how to backspace in vi?
    ... That (Emacs uses ^H for help) meant that emacs users fought (were against, ... opposed) the use of ^H for backspace. ... It is not the same as "cursor left" ... nothing to do, as such, with Linux. ...
    (comp.os.linux.misc)