If you edit the .bash_profile and your PATH is broken now, then you are not able to use the vim command to try to fix it. The solution is to use nano.
Run `nano ~/.bash_profile`
Then you will able to fix the profile with this editor.
PS.: in the Max Os X use the Control + Letter to perform the actions as for example Control + O to write and exit.