BackSpace, Delete, Vim (I've read all the FAQ's)

BackSpace, Delete, Vim (I've read all the FAQ's)

Post by Kevi » Thu, 10 May 2001 14:56:17



I use a Solaris 2.8 Ultra 10 at work and a Linux 2.2.19 Pentium
at home.  I routinely run xterms on the local machine that's
logged in to the remote machine -- at any given time the machine
defined as "local" could be either, and the remote one would be
the other.  It's important if the backspace and delete keys
behave the same way on the Solaris and Linux machines regardless
of which one is local or remote.  Up through when I was running
Redhat 5.2 I never had to think about this, since everything
worked fine.  Then I upgraded to Mandrake 7.02 and Vim has never
been the same since.  On both machines the backspace and delete
keys work locally for all applications, including Vim.  On both
machines the backspace and delete keys are swapped in Vim when
running remotely, but only when running vim, gvim is fine.
Remote shells behave just fine as do other remote app's.

I got a lot in good information from these two documents
<http://www.ibb.net/~anne/keyboard.html>
<http://www.ibb.net/~anne/keyboard/keyboardprev.html>

Initial undesired behavior is that in remote Vim sessions the
backspace key deletes the character under the cursor, instead of
the character preceding the cursor, and the delete key deletes
the character preceding the cursor, instead of the character
under the cursor.

The Vim help files suggested adding ":fixdel" to my ~/.vimrc so
I did this on both machines.  This renders acceptable behavior
on the Solaris machine.  That is the local Solaris behavior and
remote Linux behavior are fine like this.  The Linux machine is
terrible like this.  The local Linux behavior has the backspace
and delete key affects swapped in Vim (again gvim is fine).  The
remote Solaris behavior is that neither the backspace nor delete
keys work, but ^H works alright.

Below the lines of "====" is some configuration information for
each machine when running locally and remotely.  One observation
I have is that editing the /etc/sysconfig/keyboard file changing
"BACKSPACE=Delete" to "BACKSPACE=BackSpace" has no effect.
Another observation I have is that the Linux local backspace key
sends ^?, the local stty erase character is set to ^H and yet
backspacing still works.  This seems odd to me.

Can anyone suggest a way to get uniform behavior on both
machines, whether operated remotely or locally?

Thanks very much for any aid....

===========================================================================

Linux local console & xterm
    infocmp | grep kbs          --> kbs=\177
    infocmp | grep kdch1        --> kdch1=\E[3~

Linux xterm with remote login (ssh) to Solaris machine
Linux local console & Linux xterm
    stty erase ^H

Linux local shell & vi
    backspace key ^?
          del key ^[[3~

Linux local X11
    physical "backspace" key generates keycode 22
    physical "delete" key generates keycode 107
    backspace key
        KeyPress event, serial 21, synthetic NO, window 0x4000001,
        root 0x26, subw 0x0, time 597234493, (25,74),
        root:(776,96), state 0x10, keycode 22 (keysym 0xff08, BackSpace),
        same_screen YES, XLookupString gives 1 characters:  "
    del key
        KeyPress event, serial 24, synthetic NO, window 0x4000001,
        root 0x26, subw 0x0, time 597197233, (90,114),
        root:(841,136), state 0x10, keycode 107 (keysym 0xffff, Delete),
        same_screen YES, XLookupString gives 1 characters:  ""

===========================================================================

Solaris local console & xterm
    infocmp | grep kbs          --> kbs=\b
    infocmp | grep kdch1        --> <nothing>

Solaris xterm with remote login (ssh) to Linux machine
Solaris local console & Linux xterm
    stty erase ^H

Solaris local shell & vi
    backspace key ^H
          del key ^?

Solaris local X11
    physical "backspace" key generates keycode 50
    physical "delete" key generates keycode 73
    backspace key
        KeyPress event, serial 23, synthetic NO, window 0xa400001,
        root 0x2a, subw 0x0, time 568685318, (116,26),
        root:(182,136), state 0x0, keycode 50 (keysym 0xff08, BackSpace),
        same_screen YES, XLookupString gives 1 characters:  "
    del key
        KeyPress event, serial 21, synthetic NO, window 0xa400001,
        root 0x2a, subw 0x0, time 568743838, (127,73),
        root:(215,205), state 0x0, keycode 73 (keysym 0xffff, Delete),
        same_screen YES, XLookupString gives 1 characters:  ""

===========================================================================

--
Unless otherwise noted, the statements herein reflect my personal
opinions and not those of any organization with which I may be
affiliated.

--
Unless otherwise noted, the statements herein reflect my personal
opinions and not those of any organization with which I may be affiliated.

 
 
 

BackSpace, Delete, Vim (I've read all the FAQ's)

Post by Thomas Dicke » Fri, 11 May 2001 02:13:42



Quote:> I use a Solaris 2.8 Ultra 10 at work and a Linux 2.2.19 Pentium

...
you could try reading the xterm manpage.
(anne's keyboard faq is at best confused).

The XFree86 xterm supports ANSI color and VT220 emulation
There's an faq at
        http://dickey.his.com/xterm/xterm.faq.html
        ftp://dickey.his.com/xterm

--

http://dickey.his.com
ftp://dickey.his.com

 
 
 

1. I've read/am reading the faq's - but what is a Segmentation fault?

I am reading the faq's as fast as I can, but I would really appreciate a
pointer to information about Segmentation faults.  Every time I try to run
Pico (among others) the system responds with "Segmentation fault".  What
does it mean?  How can i fix it?  Is it in a FAQ?  Which one?

THANKS!!!
Dana
----------



----------
--
------------------------------------------------------------------------------
 \ The above does not represent OIT, UNC-CH, laUNChpad, or its other users. /
   ------------------------------------------------------------------------

2. root over nfs - performance problems

3. I've just been reading the unix FAQ ...

4. How to disable DNS on Solaris 7

5. Now that I've read the FAQ...

6. lilo append

7. I've read FAQ, still only get LI on boot

8. XF86 config for NEC READY

9. gcc sig11 problem (I've read the FAQ)

10. You've got yours, I've got mine... let the others in their shit!

11. I've installed Red Hat 5.0 Linux and I've got a problem

12. Setup HP LaserJet4L & Slackware v2.3 (I've read the HOW TO's)

13. Help with ppp....I've read all the How-to's .....