Arrow keys type capital letters instead of moving the cursor

后端 未结 13 1666
失恋的感觉
失恋的感觉 2021-02-01 03:49

I\'ve installed the latest vim using homebrew and also installed mac-vim from the google code homepage. in mac-vim everything works fine. but when I run vim in terminal.app in m

13条回答
  •  -上瘾入骨i
    2021-02-01 04:35

    I've run into this problem as well. It has multiple causes, but one of them is vim using vi rather than vim behavior by default. Surprisingly, this can be triggered by the location of your vimrc file.

    For example, if you delete your .vimrc from your home directory and move the contents to the system-wide vimrc file, vim will start using vi defaults. With the Mac Terminal, this will give you ABCD from arrows in insert mode. Add "set nocompatible" to the system-wide vimrc, which will force vim to use vim defaults, and the arrows will work again.

提交回复
热议问题