From 5cd34a1b64e7fc08cea2e800599e40bfd88cefa1 Mon Sep 17 00:00:00 2001 From: Rafael Regis Date: Thu, 10 Jan 2013 01:42:08 -0200 Subject: [PATCH] Fixed vim alias. - Only set vim alias if MacVim is installed (using homebrew or not) --- zsh/aliases.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 378071a..455853b 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -32,8 +32,10 @@ alias ae='vi $yadr/zsh/aliases.zsh' #alias edit alias ar='source $yadr/zsh/aliases.zsh' #alias reload # vim using -if [ "$(command -v brew)" ]; then - alias vim=$(brew ls macvim | grep Contents/MacOS/Vim) +mvim --version > /dev/null 2>&1 +MACVIM_INSTALLED=$? +if [ $MACVIM_INSTALLED -eq 0 ]; then + alias vim="mvim -v" fi # vimrc editing