Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have to work on a really old AIX workstation with vi version 3.10 in it. I have done a little work in vim, but that was much more easy to use than the old vi (atleast untill I get used to the old vi).

Since I have been using the backspace key to erase my previous character for ever since I was born, I would like to have that functionality in vi as well.

I did search for a solution.

I found the following:

  1. :set backspace=2 (:set all does not have a backspace option, nor nocompatible)

  2. stty erase ^? (Didn't work)

  3. In .exrc file in my home directory, I can set up a mapping. ie, map .

However, in the edit mode in vi, pressing backspace actually takes my cursor to one position on the left, but does not remove it.

How do I map a supposedly arrow key to make it perform the function of a backspace?

AIX Version: 5 5300 something. uname -a gives AIX << hostname >> 3 5

share|improve this question
    
In the insert mode: backspace = move cursor one step left del = Change case of character In the command mode: backspace = function of delete or x del = Change case of character –  Shashank Singh Mar 27 '13 at 11:45
    
When you enter new characters after pressing backspace in edit mode, do they replace old ones? Also, AIX gurus may want to know that AIX version are you using. –  sendmoreinfo Mar 27 '13 at 19:18
    
No they dont. It simply places the cursor to one char left of the current, without deleting it. I believe version is AIX 5 –  Shashank Singh Mar 28 '13 at 6:21
add comment

1 Answer 1

Try

:map Backspace  X

You’ll have to type a Ctrl+V immediately before the Backspace, and so the command will probably look like

:map  ^H  X

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.