In insert mode I want Backspace to delete the characters to the left of my cursor but it's acting just like Del and removing characters under my cursor. I saw somewhere I can use ctrl-k
then a key to see what VIM thinks that key is. For Backspace it's returning <Del>
and for Del it's returning <kDel>
. How can I get my Backspace key to map to <BS>
like it should be? In bash Backspace is operating normally without me making any special changes.
In PuTTY Backspace is set to ^?
not ctrl-h
.
EDIT: I tested vim with the ctrl-h
backspace setting and vim started working properly.. However I would prefer to leave that PuTTY setting alone unless someone can convince me switching to ctrl-h
is what I should do, I don't know much about why there are different key codes for backspace and maybe I'd be less hesitant to switch the default PuTTY setting if I knew more.
nocompatible
set? What does:se bs
output?^h
instead of^?
:se bs
outputsbackspace 2
I found this tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html and if I runstty erase ^?
the issue is fixed without changing PuTTY's settings. Is this approach considered bad or is it ok if this is the change I make?:set nocompatible
IMO vim is really a terrible editor until you change that setting.