Well, the Vim executables I compile myself come with $VIM defaulted to
/usr/local/share/vim and $VIMRUNTIME set to
/usr/local/share/vim/vim90/. Those from my Linux distro have $VIM set
to /usr/share/vim and $VIMRUNTIME set to /usr/share/vim/vim90. The
"system vimrc" is at, respectively, $VIM/vimrc and /etc/vimrc but
neither of them exist. My vimrc sets $VIM to /usr/share/vim so that
they both will find my user-written scripts (at $VIM/vimfiles and
below) at a common location. I don't touch $VIMRUNTIME so each of them
uses its own "distribution" scripts. This way, in the rare case that I
have to use the distro's Vim rather than my own, it will work
identically apart from a difference in patchlevels and in featureset.
The following lines do that, at the very top of my vimrc:
let $VIM = '/usr/share/vim'
set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after
let $VIMSRC = expand('~/.build/vim/vim-hg/src', ':p')
The ":set runtimepath" statement is there to make sure that the new
value of $VIM is correctly taken up. $VIMRC is an environment variable
which I set within Vim to get easily at my Vim source.
Best regards,
Tony.