In a .vimrc, is `set nocompatible` completely useless?

后端 未结 4 913
栀梦
栀梦 2020-12-08 03:45

Several users in this epic question put the following in the .vimrc:

\" Necesary for lots of cool vim things
set nocompatible

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 04:29

    I was using vim in Cygwin on a Windows VM and every time I was in Insert Mode, pressing arrow keys would result in vim printing "A", "B", "C" or "D" on the screen instead of scrolling. I found a forum that said putting vim in nocompatible mode would fix it. Thankfully, it did.

    I put "set nocompatible" in my ~/.vimrc file and the problem remains gone. So perhaps it's not 100% useless.

提交回复
热议问题