2

I use Arch Linux (ARM, but irrelevant) on a server machine, and I want to create a global configuration for Vim, based on my current personal configuration.

I have already moved my ~/.vimrc to /etc/vimrc, and that works fine, but I want to configure the filetype plugin globally too. My personal configuration files for this are in ~/.vim/after/ftplugin/. A separate file is needed for each filetype.

I've tried copying this .vim folder into /etc (but naming it 'vim' rather than '.vim'), but to no effect. Any ideas? Thanks in advance.

Archimaredes
  • 121
  • 4

1 Answers1

2

The system-wide Vim runtime files are not located under /etc. Inside Vim, type :set runtimepath?, and it will tell you all directories, usually including something like /usr/share/vim/vim73.

You can either put your config in there (but be aware that these existing locations might get overwritten by package updates!), or, if you have a customized global /etc/vimrc, anyway, you can also add any arbitrary directory via :set runtimepath+=/etc/myvimstuff there.

Try to avoid the after directory; this is meant for user customization.

Ingo Karkat
  • 232
  • 5
  • 10