Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Fix the backspace key when using vim via ssh Apps
I was using the Terminal to ssh into a linux server. The backspace key worked fine inside the shell, but when I entered vim to edit text files, the backspace key started behaving like a delete key -- it was deleting the character under the cursor instead of the one to the left.

The solution was to go to the Terminal menu, select Window Settings, and then click on Emulation from the pop-up menu. Check the "Delete key sends backspace" option, and all is good to go.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[10,705 views]  

Fix the backspace key when using vim via ssh | 6 comments | Create New Account
Click here to return to the 'Fix the backspace key when using vim via ssh' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fix the backspace key when using vim via ssh
Authored by: prk on Oct 09, '03 11:32:44AM

I have found that if I set my TERM to "linux" while SSHed into a Linux system, all the keys work correctly. IE: Home, End, PGUP, PGDown, Delete, Backspace, ....

In MacOSX I set my term to "screen" and it mostly works. In Panther it seems to work a lot better.



[ Reply to This | # ]
Fix the backspace key when using vim via ssh
Authored by: wayoutwest on Sep 12, '04 03:42:01AM

End your delete-should-backspace woes when using Vim remotely with iTerm by adding one simple keyboard mapping. Go to iTerm preferences, Profiles, Keyboard, choose Profile=Global, add this mapping...

Key: delete
Action: send hex code
Hex code: 0x08

And while you're adjusting prefs, go to the Terminal tab and check the bottom option: When idle, sends ASCII code 0. Now your session won't end if you're idle for more than 4 seconds.

---
No hay firma.



[ Reply to This | # ]
irb
Authored by: ThreeDayMonk on Oct 09, '03 03:01:31PM

On a related note, if anyone knows how to get the backspace key to work in irb (interactive Ruby), I'll be eternally grateful.

I can edit normally in tcsh and bash, but start an irb session and I just get ^H instead. It does the same in Terminal.app, iTerm and xterm. That rather detracts from the usefulness of an interactive program.



[ Reply to This | # ]
irb
Authored by: Rupa on Oct 10, '03 03:08:58AM

Did you ever try issuing the following command in the terminal session you are having problems:

stty erase <BACKSPACE><ENTER>

?
Rupa



[ Reply to This | # ]
irb
Authored by: googoo on Oct 10, '03 01:37:46PM

Have you tired typing the following command (literally)?

stty erase ^h

This should set the erase character to <control>H, which is the backspace.

-Mark



[ Reply to This | # ]
irb
Authored by: ThreeDayMonk on Oct 14, '03 05:39:50PM

Yeah - that works! Thanks.



[ Reply to This | # ]