How to specify a startup folder in the open command to launch MacVim?
Since you're using MacVim, and it doesn't seem to be a problem with the open command:

MacVim comes with its own script called mvim.

You can use it just like gvim to open files in the MacVim GUI, or pass -v to it to open in regular text mode with the ability to use :gui later.



Also, you can just use open -a MacVim &lt;file&gt;, no need to use --args. It'll figure it out just as if you double-clicked on the file in the Finder.