I want /usr/local/share/vim/vimfiles/pack be used for local packages. I added the following to /etc/vimrc.local

set runtimepath+=/usr/local/share/vim/vimfiles

When I start vim I see that runtimepath contains /usr/local/share/vim/vimfiles, but packages and color schemes are not visible. Of course if put my packages in /usr/share/vim/vimfiles/pack, everything works as expected. What am I missing here?

OS: Ubuntu, Rocky, Fedora Vim version: 8.2

  • "What am I missing here?" Your personal playground is ~/.vim/; leave /etc/ and /usr/local/ alone.
    – romainl
    Feb 2, 2023 at 6:14
  • See also packpath
    – D. Ben Knoble
    Feb 2, 2023 at 18:08
  • Thank you D. Ben Knoble! It did the trick. I was not aware of this setting. Could you document this as answer? I am sure it will be useful for others. Feb 3, 2023 at 23:15

2 Answers 2


While I agree with the sentiments that you should do your customization in your home directory, to affect packages use packpath, not runtimepath.

  • Thank you for the answer, it is very valuable. I think the idea of this website is to ask for and obtain information, and not to express opinions, especially when one does not see the full picture. Feb 4, 2023 at 22:59
  • OTOH, the advice of long-time users may be worth pausing for a moment’s reflection.
    – D. Ben Knoble
    Feb 5, 2023 at 2:04
  • I just asked chat.openai.com "how to be humble and not give advice" Got a very interesting feedback :-) Feb 5, 2023 at 5:04

The /usrdirectory is outside of your home directory and shared for all users.

It is not recommended to use folders that require root privileges when the same thing can be done in your home folder ~.

  • What about when you want to build a server with a library of packages? You are going to tell users to do it yourself or just tell them to 'set packpath+=/usr/local/share/vim/vimfiles' and do 'packadd pkg' they want? Feb 4, 2023 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.