I tried following the instructions in Backspace key not working in vim , but I still have the same problem: BACKSPACE inserts a ^?
That is to say: inserting set bs=indent,eol,start
in my ~/.vimrc
did not solve the problem.
I am sure that I am loading the correct source file (I did a test of another setting, and the change propagated).
I am using: Vi IMproved 7.2
on Ubuntu with Gnome. In the terminal application, backspace works properly.
Best Answer
Vim seems to be confused about what your terminal sends as the erase character. As this varies between
^?
(Ctrl+?, orDEL
for "delete") and^H
(Ctrl+H orBS
for "backspace"), Vim depends on someone telling it what to expect.That shouldn't happen unless
vimrc
,TERM
environment variable,For troubleshooting, try to run the command
stty erase ^?
before starting Vim, and see if this fixes it. Enter the^?
not separately as^
and?
, but by first pressing Ctrl+V, then your Backspace key. If your shell is well-behaved, this should produce a literal representation of whatever your terminal sends when you hit that key.