Solaris, vi (not vim), key bindings

hi,

i am facing a problem that (i think) many people had before.
under linux i use vim and therefor i am used to be able to use the cursor, delete and backspace keys in edit mode.
that's not the case in the classic vi, e.g. under solaris. when hitting these keys, uninteded char sequences are produced.
i managed to fix the cursor keys with this:

$ cat ~/.exrc
:map! ^[OA ^[ka
:map! ^[OB ^[ja
:map! ^[OC ^[la
:map! ^[OD ^[ha
$

^ please note that ^[ must be produced with ctrl-v + ESC.

so far so good, but what i'd like to have too are the delete and backspace keys.
i'd like the same behavior like in vim in the nocompatible mode.
delete should delete the char under the cursor, the cursor shouldn't move.
backspace should delete the char left of the cursor, the cursor moved to the left.

any ideas very welcome.
thanks in advance.

I would think that your issue would be fixed (or close to being fixed) if the TERM is set correctly for whatever you are using to connect to the SUN server.
Normally, I have to type the following for the backspace key to work (even when my TERM is correctly set for vt100). This normally has nothing to do with vi - does this on the command line too.

stty erase ^?

(Note that the ^? is what backspace produces - once the system knows that is what erase should be equal to, it works - I'm using Putty to connect).