1

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

3
  • 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 Mar 27, 2013 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. Mar 27, 2013 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 Mar 28, 2013 at 6:21

1 Answer 1

2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .