Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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