Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.912 kb
" Copy this to ~root/.vimrc (and make sure there's no ~root/.vim) in order to
" load vim users' vim configuration instead of our own.
" For root users logging in over SSH, you can put this into
" ~root/.ssh/authorized_keys:
" environment="SUDO_USER=ondrej" ssh-rsa ...
" (Note that you'll need "PermitUserEnvironment yes" for this to work.)
" Set $SUDO_HOME if it's not already set.
if !empty($SUDO_USER) && empty($SUDO_HOME)
let $SUDO_HOME = expand("~" . $SUDO_USER)
" Based on the idea from
" but modified
if empty($VIMINIT) && empty($EXINIT) && !empty($SUDO_HOME)
" XXX(dlitz) is the vundle thing really needed?
"set runtimepath+=${SUDO_HOME}/.vim/bundle/vundle,${SUDO_HOME}/.vim
set runtimepath+=${SUDO_HOME}/.vim
let $MYVIMRC = $SUDO_HOME . '/.vimrc'
source $MYVIMRC
Jump to Line
Something went wrong with that request. Please try again.