X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.profile.d%2Fvim.bashrc;h=15b4008a8d580b4ffde01f1b2e89be09dff9c294;hb=e5ea7321936322231fc19d4a0ed2ff175c7c6143;hp=4ee1bc00d4975640938f036659efb7a5a05d193d;hpb=74c06de77d0ee3ea428a9fa0f6a83274ef62930f;p=profile.git diff --git a/.profile.d/vim.bashrc b/.profile.d/vim.bashrc index 4ee1bc0..15b4008 100644 --- a/.profile.d/vim.bashrc +++ b/.profile.d/vim.bashrc @@ -1,3 +1,12 @@ vim=$(find_working vim 2>/dev/null) -[ $? = 0 ] && alias vi="$vim" +if [ $? = 0 ]; then + if [ -n "$PROFILE_HOME" ]; then + VISUAL="$vim --cmd ':se rtp=$PROFILE_HOME/.vim,\$VIMRUNTIME' -u $PROFILE_HOME/.vimrc" + else + VISUAL="$vim" + fi + alias vi="vim" + alias vim="$VISUAL" + export VISUAL +fi unset vim