Is there a way to reference (or “source”) another user’s .vimrc file?
When I kuu (a variant of su that uses kerberos security tokens) to an admin user ID, I would like to use my personal .vimrc file.
I don’t want to overwrite the admin’s existing .vimrc file because the admin ID is shared by multiple users.
You can use the
MYVIMRCenvironment variable. This way, you won’t have to pass-ueach time you fire up vim. (You can of course do an alias instead, but that won’t help with e.g.,vipw)Keep in mind that
.vimrccan execute arbitrary commands, if you use/home/user/.vimrcyou may be creating a security issue (e.g., someone manages to compromise your user account, changes your .vimrc, and then gets root the next time you edit a file as root). You can, of course, keep a known-safe copy in~root/somewhere.You could assumably even set something up in
~root/.bashrcto automatically setMYVIMRCto something different for each different administrator.