Added sudo capability to vimrc

This commit is contained in:
Eric Renfro 2018-09-12 16:30:11 -04:00
parent d84f6b0620
commit d88349d41b
Signed by untrusted user who does not match committer: psi-jack
GPG key ID: 14977F3A50D9A5BF

33
vimrc
View file

@ -1,11 +1,26 @@
set runtimepath+=~/.vim_runtime
if file_readable('/home/' . $SUDO_USER . '/.vimrc')
set runtimepath+=/home/$SUDO_USER/.vim_runtime
source ~/.vim_runtime/vimrcs/basic.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
source ~/.vim_runtime/vimrcs/plugins_config.vim
source ~/.vim_runtime/vimrcs/extended.vim
source /home/$SUDO_USER/.vim_runtime/vimrcs/basic.vim
source /home/$SUDO_USER/.vim_runtime/vimrcs/filetypes.vim
source /home/$SUDO_USER/.vim_runtime/vimrcs/plugins_config.vim
source /home/$SUDO_USER/.vim_runtime/vimrcs/extended.vim
try
source ~/.dotfiles/my_configs.vim
catch
endtry
try
source /home/$SUDO_USER/.dotfiles/my_configs.vim
catch
endtry
else
set runtimepath+=~/.vim_runtime
source ~/.vim_runtime/vimrcs/basic.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
source ~/.vim_runtime/vimrcs/plugins_config.vim
source ~/.vim_runtime/vimrcs/extended.vim
try
source ~/.dotfiles/my_configs.vim
catch
endtry
endif