Right now, I make everyone do ~/.vimrc and put their settings there.
How can I make a global, default .vimrc for new users?
Right now, I make everyone do ~/.vimrc and put their settings there.
How can I make a global, default .vimrc for new users?
usually by creating /etc/vimrc or /etc/vim/vimrc. Depends on your version of vim and linux/unix
to create a default ~/.vimrc for all new users, you should be able to drop it into /etc/skel
If I recall correctly, that provides the template for new user's home directories.
In Debian, it appears the file you are looking for is:
It might be different in a different distro (though I think that is not much likely).
Good luck.
See
:help system-vimrc
:So, put your system configurations in this file. Type
:help version
in vim to see where, orecho $VIM
at the shell to see if$VIM
is defined. (Note that you may have to set$VIM
for all users, such as in a system bashrc file.)for MacVim, it's at
/usr/local/Cellar/macvim/7.4-98/MacVim.app/Contents/Resources/vim/vimrc
Vim appears to have changed to loading a
defaults.vim
file last in the absence of~/.vimrc
. Until this is addressed, I figured I need to loaddefaults.vim
in/etc/vim/vimrc.local
the way a samplevimrc_example.vim
shows, set a flag to prevent the automatic loading ofdefaults.vim
last and then set own preferences in the same file.https://github.com/vim/vim/issues/2917#issuecomment-631908139