Not reading ~/.vimrc

后端 未结 13 2118
借酒劲吻你
借酒劲吻你 2020-12-07 14:41

I have a ~/.vimrc file that vim doesn\'t seem to be reading. There is a file at /etc/vimrc, and it looks like it is using that one.

My understanding is that the one

13条回答
  •  -上瘾入骨i
    2020-12-07 15:17

    Stumbled on this post and non of the suggestions worked for me. Some useful things not mentioned here:

    1. vim --version should give you some useful info including the startup files. (Mine listed "virc" in several places (not vimrc)
    2. If your vim isn't really vim then perhaps it is looking for ~/.exrc instead of .vimrc (Mine looks for some system vircs, then some users vircs and then $HOME/.exrc)
    3. If your file (whichever one it is) has DOS line endings it may cause errors

    ... so even though I've got a real vim, it's looking for "virc"

提交回复
热议问题