I know that I can :source /path/to/some/.vimrc
to load my user's .vimrc
when running as root, but how can I use the entire .vim/
directory as well? Is there a startup option for using /home/user/.vim/
that I can set up as an alias?
And where in the fine manual would I have found this information if I had know what to look for. A simple :help .vim
or :help .vimrc
did not find the information regarding using the entire .vim/
direcotry (-U
is only for the .vim
file).
Thanks.
Best Answer
use the environment variable
VIMINIT
to point to the right.vimrc
andVIMRUNTIME
to point to the right.vim
-directory. you can do this viaenv
:as always: if thats too long to type, create a shell-function or a shell-alias.
to read more about how
vim
launches and what happens behind the scenes, read:help initialization
.