Typically what you want is for backspace to send ^?
and not ^H
. (I need a citation, but this is typically how modern terminals work.)
It looks like MobaXterm has an option to have backspace send ^H
, I imagine that option is currently set on your MobaXterm, perhaps start by trying to uncheck that option.
Then you should look into why Vim has an impression that ^?
is not valid for backspace.
Perhaps start by checking what Vim thinks the escape sequences for the backspace key is:
:set t_kb
Normally, this should be ^?
, if you have ^H
, then check why that might be. Do you have a setting for t_kb
in your .vimrc
or another sourced file?
If that still doesn't solve it, you might want to explore these tips on backspace problems.
UPDATE: OP tracked it down to the version of xterm they were using. Setting t_kb
explicitly in .vimrc
produced a successful workaround for the issue.
Quoted by the OP, from the forums of the issue:
Good workaround if you can't/don't want to install a new version of xterm or whatever is to simply go into your .vimrc (in vim) and add the following:
set t_kb=^?
Note that you don't want to type '^' and then '?', but rather hit ;<backspace>; this should create a ^? symbol (or, if you have some similar bug, whatever symbol it thinks is backspace).