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
I'm assuming that your initial owner owns your tty. If so, you can get your initial USER with:
stat -c'%U' `tty`
By placing your customized root .vimrc in /root/.vimrc.$USRNAME you can keep a reasonably secure customized vimrc file. You can do other things too, but I leave that to your imagination.
Method 1 - put this in your /root/.bashrc & smoke it:
# Source a custome vimrc if it exists
mytty=`tty`
initial_user=`stat -c'%U' $mytty`
custom_vimrc="/root/.vimrc.$initial_user"
if [ -f $custom_vimrc ]; then
export VIMINIT="source $custom_vimrc"
fi
Method 2 - put something similar in your /root/.vimrc (a better solution since you might use ksh).
If anyone can figure out Method 2, I'd welcome the post. I lack motivation.