John Leimon
John Leimon

Reputation: 1091

MacVim: Files outside of the home directory cannot be opened from the command line unless full path is specified

I'm trying to open a file using MacVim 7.3 (53) from the command line using the bash shell in the Terminal system application in OS X 10.6.6. Files specified as command line arguments to MacVim are always opened from the home folder. For example:

> cd ~
> cd somefolder
> MacVim somefile.txt 

This results in the file ~/somefile.txt being opened instead of ~/somefolder/somefile.txt.

If the full path to the file is specified in the command line argument the file will be opened as expected. For example:

> cd ~
> MacVim ~/somefolder/somefile.txt

Setting the option autochdir in .vimrc does not resolve the issue.

Upvotes: 1

Views: 333

Answers (1)

ismail
ismail

Reputation: 47602

Use the mvim command line shell script to execute MacVim from command line. Just tested and it works as expected.

Upvotes: 1

Related Questions