Skip to content

Commit

Permalink
Fixed vim alias.
Browse files Browse the repository at this point in the history
- Only set vim alias if MacVim is installed (using homebrew or not)
  • Loading branch information
rafaelregis committed Jan 10, 2013
1 parent 745667a commit 5cd34a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zsh/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cd34a1

Please sign in to comment.