On 2023-06-12, Jose Caballero wrote:
> Indeed, this worked:
>
> :set runtimepath=~/.vim/ftplugin/foo,$VIMRUNTIME
>
> I assume I can add it to .vimrc, so I don't need to do it every time.
>
> Thanks a lot for your help !!!
You're welcome. I'm glad that worked.
By default, 'runtimepath' contains more that just $VIMRUNTIME,
though. as you can see from ":help 'runtimepath'". If you want to
put ~/.vim/ftplugin/foo in your 'runtimepath', then a better
solution would be this:
:set runtimepath+=~/.vim/ftplugin/foo
or, if you want your directory to be first, this:
:set runtimepath^=~/.vim/ftplugin/foo
And yes, you can put that in your vimrc.
Regards,
Gary