Re: how to backspace in vi?
- From: Unruh <unruh-spam@xxxxxxxxxxxxxx>
- Date: 19 Sep 2006 00:44:40 GMT
floyd@xxxxxxxxxx (Floyd L. Davidson) writes:
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:
Self contradiction? Where?
Yes! You are right about Emacs, but please note that that
necessarily means that Emacs' developers contributed to
the conflicting usage of ^H.
That is clearer? Ok, if you say so.
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.
Actually I learned to use a computer on an old IBM 1620, flicking switches
on the console. It was my university's mainframe and they let a bunch of
in on the weekend to play with it.
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.)
??? It was IBM who defined the backspace key to send out ^H, look at the
technical reference manual bios code for the original PC. That had nothing to do with
Gates.
since backspace is far more used than forward delete.
It was a <Delete> key, it sent a DEL character... and you say it
There was no Del character as I recall. And there were no cursor keys
either.
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
?? space is an ascii character which certainly is destructive.
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.
?? Best?
You are apparently an example of Microsoft's marketing success.
Sure am. And the PC'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.
Of course not. Again a straw man.
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.)
??? Most use hex now, not octal.
...
...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_.
Not only did I not mean to say it, I never did say it.
I always said that ^H was used as HELP in emacs, which was why they fought
the use of ^H for backspace.
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.
I am afraid that they do by useage, much as I dislike it.
Back in the days you are talking about it was DEC that defined standards
for exactly the same reason that Microsoft does now-- they dominated the
sales of terminals etc. especially in universities.
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*.
Unfortunately they do not work consistantly and with each other.
If you define your system to have the backspace key send ^? some programs
will barf, and if you define it to send ^H others will.
My only point was that the use of the backspace key to do a destructive
backspace, which is what most people want it to do is a mess under Linux,
for whatever historical reasons you may care to ascribe it to.
...
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... ;-)
I run across them, I swear, I type conrol-H and go on. I do not remember
them.
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*...
Unfortunately they are NOT designed that way. Sure they should be.
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!
??? another straw man.
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.
Lets see, Linux does it right? Linux is the kernel, and the kernel does not
care. Or are you now adopting my position that Linux is the whole
distribution? In which case some of the programs do not do it right.
Many do. Some do not.
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.
His problem was that he wanted the backspace key in vi to act as a
destructive backspace. It worked that way in a terminal window for him and
did NOT work that way in vi for him. He wanted it to work as a destructive
backspace in vi. I have no idea how my fabrications, as you call them,
would give him any problems at all. If they really were fabrications, they
would affect his actions in no way whatsoever. On the other hand my advice
would allow him to use vi in the same way as he did his terminal which was
his problem. On the other hand your "corrections" would do absolutely
nothing for him. He would be left as much in the dark about how to get vi
to work as before. In fact it is so bad, that you admitted that you have no
idea how to get vi to work so that the backspace key does a destructive
backspace. Now, if you, who claim such a deep knowledge of Linux cannot get
the system to behave as it should, so that you think that vi has no
destructive backspace, then I claim that this is prima fascia evidence that
Linux IS messed up.
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
??? No, you can set up vi to work such that ^H is destructive backspace, or
that ^? is destructive backspace.
The key above return often produces ^? in vi, not destructive backspace. IF
that happens then you will usually find that ctrl-H produces destructive
backspace.
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????
Why not. So much excess junk has already been quoted, what is a few extra
signature lines. I obviously do not want you accuse me of trying to erase
your identity.
--.
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx
- Follow-Ups:
- Re: how to backspace in vi?
- From: Floyd L. Davidson
- Re: how to backspace in vi?
- References:
- how to backspace in vi?
- From: ToddAndMargo
- Re: how to backspace in vi?
- From: Unruh
- Re: how to backspace in vi?
- From: Floyd L. Davidson
- Re: how to backspace in vi?
- From: Unruh
- Re: how to backspace in vi?
- From: Floyd L. Davidson
- Re: how to backspace in vi?
- From: Unruh
- Re: how to backspace in vi?
- From: Floyd L. Davidson
- how to backspace in vi?
- Prev by Date: large file support / O_LARGEFILE / linux 2.6.9
- Next by Date: Re: how does linux 2.0.x support vga
- Previous by thread: Re: how to backspace in vi?
- Next by thread: Re: how to backspace in vi?
- Index(es):
Relevant Pages
|