When using Mac OSX there are times when opening a file from the terminal into your favorite editor is necessary. This is accomplished by using the .profile file located in your home directory.
Open files into MacVim
Add the following to your .profile and use “vim filename” top open the file into the external editor
Now when you want to edit files in your terminal use:
and your MacVim editor will pop open with all its happyness.
Open files in TextMate
To open files in TextMate, you have to create a link to the ‘mate’ program. This is easily done during the install, but sometimes I forget to do this. The next way that is pretty easy is to run the following in your shell prompt:
Now you are able to open folders and files into Textmate from the terminal using these commands: