1

Each time I open NeoVim, I have to type :so .vimrc (it is located inside of my $HOME folder) for it to load the file.

I've tried googling my way out of it, but I can't seem to get any results on what I want to do. The results are stuff like "auto source vimrc when saved", "reload vimrc without restart" etc. and none of these worked, either.

Is it possible to automatically source that file upon startup instead of manually typing it each time I open nvim?

1 Answer 1

4

The NeoVim editor uses ~/.config/nvim/init.vim.

See the vimrc-intro section in the NeoVim manual.

You could also set VIMINIT to the Ex command so ~/.vimrc to force the sourcing of the ~/.vimrc file, as described in the $MYVIMRC section.

1
  • Magnificent!! Worked a charm. All i had to do was to add source $HOME/.vimrc and it autoloads the file now. Thanks :) Commented Dec 24, 2021 at 7:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.