From: Iain Patterson Date: Fri, 26 Feb 2010 07:44:25 +0000 (+0000) Subject: Use vim alias for P4EDITOR etc. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=e082b7ddc9c8ad1fc763566b5e6bbd72b7ff26db;p=profile.git Use vim alias for P4EDITOR etc. --- diff --git a/.profile.d/p4.bashrc b/.profile.d/p4.bashrc index 2850951..736d7e4 100644 --- a/.profile.d/p4.bashrc +++ b/.profile.d/p4.bashrc @@ -8,18 +8,20 @@ fi export P4CONFIG=.p4config eval $(alias diff 2>/dev/null | sed 's/^alias diff/P4DIFF/') export P4DIFF="${P4DIFF:-diff} -u" -P4EDITOR=vim +eval $(alias vim 2>/dev/null | sed 's/^alias vim/p4vim/') +p4vim=${p4vim:-vim} +P4EDITOR="$p4vim" p4script=$(find_target_profile ".vim/script/p4") -[ -n "$p4script" ] && P4EDITOR="vim -S '$p4script'" +[ -n "$p4script" ] && P4EDITOR="$p4vim -S '$p4script'" export P4EDITOR if [ -z "$DISPLAY" ]; then p4script=$(find_target_profile ".vim/script/merge") if [ -n "$p4script" ]; then - export P4MERGE="vim -S '$p4script'" + export P4MERGE="$p4vim -S '$p4script'" else - export P4MERGE="vim -o -c '3wincmd j' -c 'wincmd L'" + export P4MERGE="$p4vim -o -c '3wincmd j' -c 'wincmd L'" fi else export P4MERGE="p4merge" fi -unset p4script +unset p4script p4vim