please help to make delete key work
can someone please help me? i want to use the backspace key to work as delete in vi, but i've never got it working. I use the "stty erase ^?" to set it but it only does as to backspace. I'm using SunOS.
Thanks in advance |
What do you want exactly to do with delete and/or backspace ?
- under the shell and under vi ? - with the standard vi or vim ? - in vi insert-mode or command-mode ? |
in vi insert-mode. like typing error and able to delete the errors by just pressing the backspace key. thanks
|
I just tried and both backspace and delete do remove previously entered characters under vi, with your stty setting.
Are you remotely connected from a linux box ? |
i'm using SunOs, I know that Linux works but with SunOS i'm having this problem
|
That wasn't my question.
My question is: are you connecting to the Solaris box remotely from a Linux box ? By the way SunOS is a bit vague, its first version was launched about 24 years ago. |
I have a similar problem running SunOS. I'm running on a Linux box so in my user.cshrch I have
stty sane erase '^H' >& /dev/null So backspace works on Linux. But if I rsh over to a SunOS box my backspace does not work. |
Did you try the same stty command on Solaris ?
The redirection seems to me unnecessary, but doesn't hurt either. |
Yep after I rsh over I source the user.cshrc
Also tried just typing that line in at the prompt and it seems to have no effect. |
What happens when you use the backspace key in the command line (shell) ?
Does it displays "^H" ? If true, is the delete key erasing characters or displaying "^?" ? |
You just made me answer my own question, sorry for my retardedness!!
Over on Sun I was getting the ^? instead of ^H, so obviously the same line won't fix it for both. I put an if/else statement in my user.cshrc to change the ^H to ^? if system is Sun. Thanks ;) |
Okay, I understand now, you are using JDS gnome-terminal which has an obnoxious option that allows to fool the system:
Terminal / Current Profile / Compatibility default value of: "Backspace" send "Delete", and "Delete" send "<esc>[3~" :confused: I don't know who had the stange idea to mess with these keys, but anyway, it's easy to set the key to their regular behaviour and fix the problem. After that, you can bring your .cshrc back to its previous settings, which is better, as other terminals like xterm, dtterm, rxvt, kterm and others are not affected. |
Well, I'm actually using Konsole (I have rather limited system control as this is a company computer) as I am running KDE on an archaic version of Redhat. I guess it has a similar type of option?
|
I'm confused, I was thinking you were experiencing this problem only when on Solaris.
Is your kconsole running on Linux or Solaris ? Try launching "/usr/openwin/bin/xterm&" when connected on Solaris, and see how the keys behave. Run too: Code:
xmodmap -pk | egrep "(Delete|BackSpace)" |
I'm on Linux, but using rlogin to get to a Solaris box.
It's ok I fixed up my user.cshrc so the backspace works in both environments now. I was just curious if Konsole had that similar "obnoxious option that allows to fool the system" No worries though, thanks for your help :) |
All times are GMT -5. The time now is 04:19 PM. |