From d6b57a3d60648fecb848a223e4cdcee6cfdb8eb5 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 6 Feb 2009 17:05:38 +0100 Subject: [PATCH] Only use vim -p when it's available. -p is available since Vim 7. --- zsh/rc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zsh/rc b/zsh/rc index a505a4e..88eb6b4 100644 --- a/zsh/rc +++ b/zsh/rc @@ -205,8 +205,10 @@ alias diff='diff -u' # Display all files and use human readable sizes. alias du='du -sh' -# Multiple files given to Vim are opened in tabs. -alias vim='vim -p' +# Multiple files given to Vim are opened in tabs, supported since Vim 7. +if [[ ${${${(f)"$(vim --version)"}[1]#VIM - Vi IMproved }%% *} == 7* ]]; then + alias vim='vim -p' +fi # Shortcuts for often used programs. alias e='elinks' -- 2.45.2