From: Simon Ruderich Date: Fri, 6 Feb 2009 16:05:38 +0000 (+0100) Subject: Only use vim -p when it's available. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=d6b57a3d60648fecb848a223e4cdcee6cfdb8eb5;p=config%2Fdotfiles.git Only use vim -p when it's available. -p is available since Vim 7. --- 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'