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