0

So I've got the following init.vim under ~/.config/nvim/

source plugins.vim

plugins.vim lives in the same directory. When I'm opening [Neo]Vim I always get

Error detected while processing /home/luke/.config/nvim/init.vim:
line    1:
E484: Can't open file plugins.vim

Does anybody know what I am missing?

romainl
  • 186,200
  • 21
  • 280
  • 313
Luke
  • 365
  • 3
  • 10

1 Answers1

2

The path for source command is always taken relative of the current working directory. Hence, you should specify full path instead. For example,

source <sfile>:h/plugins.vim

Another possibility is using runtime command that does searching along the 'runtimepath'. E.g.

runtime plugins.vim
Matt
  • 13,674
  • 1
  • 18
  • 27