7
votes

I was looking to get into learning a text editor for programming. However, I've quickly run into a little snag that I can't seem to find a solution to.

I have modified my /home/user/.nvimrc file to add some plugins and I can load it using :source ~/.nvimrc, however, it never loads automatically. :scriptnames shows a list of scripts in /usr/, but mysteriously absent from the list is the .nvimrc file in my home directory. Again, I can load it in the command line, but I'd like to not have to use :so ~/.nvimrc every time I open a file.

I am not using sudo to run vim.

How can I solve this problem? Is this something everybody has to do?

2

2 Answers

19
votes

Could be this issue: https://github.com/neovim/neovim/issues/3530

Summary:

New location is ~/.config/nvim/init.vim

To keep ~/.nvimrc you can source it from the new location:

mkdir -p ~/.config/nvim
echo 'source ~/.nvimrc' > ~/.config/nvim/init.vim
2
votes

Instead of referring to your rc file directly, consider using $MYVIMRC:

:e $MYVIMRC
:source $MYVIMRC

Reference: Learn Vim the Hard Way/Editing your vimrc