Search code examples
vimkeyboard-shortcutskeymapping

Macbook Pro 15", backspace not working with VIM?


I just got a new macbook pro 15" in my hands and it seems that for some weird (mapping?) reason, within vim I cannot use backspace (delete character left of the cursor!). However, all other operations including delete (character on right side of cursor which is fn+backspace) work fine!

Anyone has already troubleshooted this weird behaviour?

FYI, the keyboard has the German layout but in software I use the International English layout. On my other laptop (macbook pro 15" but 2010 model - though same software but normal english international physical keyboard layout I never had such an issue)


Solution

  • Most likely you are running vim in compatible mode.

    Create a file called ~/.vimrc and put the following lines in it.

    set nocompatible
    set backspace=indent,eol,start
    

    Setting the backspace option should change the backspace key to behave how you expect it to. However these should be set by the system vimrc on mac.