Search code examples
vimbackspace

Odd behavior of backspace in Vim (SSH to Linux from Mac)


I didn't change any setting of my Vim, but today the Backspace gets some crazy behavior. Every time when I hit it, it does not delete a character, but prints ^?. Anyone knows what is going on?


Solution

  • The problem comes from the communication between Mac Terminal the Linux Terminal.

    Go to the Mac Terminal -> Preferences -> Advanced tab, check the option "Delete sends Ctrl-H". Then after I login to Linux, and Backspace works just fine in Vim.