I'm using vim editor in linux and every time I type backspace it inserts a "^?" instead. I DID edit the .vimrc file to include backspace=indent,eol,star
but it did not help. I also tried backspace=2
and it doesn't work either. The strangest thing is that if I type :fixdel
it stops inserting the weird ^?
but instead deletes the next character instead of the previous.
In :h fixdel
it mentions this:
If the backspace key terminal code is wrong you can use this: >
:if &term == "termname"
: set t_kb=^V<BS>
: fixdel
:endif
Where "^V" is CTRL-V and "<BS>" is the backspace key
(don't type four characters!). Replace "termname"
with your terminal name.
Have you tried that in your vimrc
?
-
1There's a deeper issue of
TERM
being wrong, and / ortermcap
/terminfo
having a different idea ofkb
/kbs
than what the keyboard actually produces. An ever-green problem in some Linux-shaped corners of the land. :) – Sato Katsura Aug 30 '16 at 20:55
star
is not a valid option forbackspace
; I think you meanstart
. – Martin Tournoij Aug 31 '16 at 11:54