backspace not working, even after attempted fix

Vim seems to be confused about what your terminal sends as the erase character. As this varies between ^? (Ctrl+?, or DEL for "delete") and ^H (Ctrl+H or BS for "backspace"), Vim depends on someone telling it what to expect.

That shouldn't happen unless

  • you're changing related settings in your vimrc,
  • you're changing the value of the TERM environment variable,
  • your terminal information database is messed up, or
  • you're suffering from a gremlin infestation.

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.

Tags:

Vim

Backspace