My default editor is pico at my server. I use Bash and Linux.
I tried to change Vim to be my default editor unsuccessfully by
echo vim > $EDITOR
Since things have changed in MAC X you will have to add following in .profile file in base directory of the user
export EDITOR='vim'
you can follow following instructions:
1> open terminal
2> type - cd [hit return/enter (this will take you to base directory)]
3> type - echo "export EDITOR='vim'" >> .profile (hit return/enter and you are done)
4> (restart terminal)
=========================
OR just type:
echo "export EDITOR='vim'" >> ~/.profile
hit enter and restart