Not reading ~/.vimrc

后端 未结 13 2143
借酒劲吻你
借酒劲吻你 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条回答
  •  长情又很酷
    2020-12-07 15:23

    if you're on linux and want to know if vim is accessing your ~/.vimrc on startup you can launch it with strace:

    strace -o vim_strace vim
    

    then quit vim. Open the vim_strace file and search for "vimrc" in the file. you should find a line like that

    stat64("/home/youruser/.vimrc", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    

    which mean that at least vim sees the file.

提交回复
热议问题