Add the following line to your .bash_profile
export PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH
This sets the location where you want Terminal to look for binaries on your machine.
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl/usr/local/bin
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl/usr/local/bin
Set up Sublime as the default editor in your .bash_profile
export EDITOR='subl -w'