Joined April 2014
·

Mike Robertson

Spocdoc
·
New York, NY
·
·

Posted to Fix vim after upgrading to yosemite over 1 year ago

I wouldn't recommend removing the system vim outright. What I do is detect the most recently modified version of vim and set that to the EDITOR variable (and then alias the vim command to it)

find_vim()
{
  local IFS=$'\n'
  local vim
  for vim in $(whence -ap vim); do
    if [[ -z $BEST_VIM ]] || [[ $vim -nt $BEST_VIM ]]; then
      export BEST_VIM=$vim
    fi
  done
}
find_vim

if [[ -n "$BEST_VIM" ]]; then
  export EDITOR="$BEST_VIM"
fi
Achievements
1 Karma
0 Total ProTip Views