Macvim: Opening MacVim inside the terminal

Created on 3 Jun 2018  路  5Comments  路  Source: macvim-dev/macvim

I am really not understanding how to open MacVim from inside the terminal, and also open it IN the terminal. I moved /Applications/MacVim.app/Contents/bin/mvim to /usr/local/bin, but then I got the error "Sorry, cannot find Vim executable." Can anyone please assist?

Most helpful comment

@KayDee Did you copy or move mvim from /Applications/MacVim.app/Contents/bin? That binary needs to remain where it was and you should call it directly instead of copying it.

You could either add /Applications/MacVim.app/Contents/bin to your path, or better yet, make a symlink to it. For me, I do sudo ln -s /Applications/MacVim.app/Contents/bin/mvim /usr/local/bin/mvim, but you can use other folders instead of /usr/local/bin/ if you want.

Edit: Huh, just realized the message I'm replying to is from last year. But the point still stands.

All 5 comments

run /Applications/MacVim.app/Contents/bin/Vim or mvim -v

Both of the commands are giving errors.
mvim -v still says "Sorry, cannot find Vim executable".
/Applications/MacVim.app/Contents/bin/Vim says no such file or directory.

I checked, it is there.

The version you moved checks actual vim binary from a directory above. It' better just to add /Applications/MacVim.app/Contents/bin folder to the PATH

you can install MacVim via homebrew and it will work with just mvim from the terminal
or if you downloaded the app from the website, you can have an ~/.aliases file where you set up aliases to make things easy to open from the terminal. eg --->

alias mvim="/Applications/MacVim.app/Contents/bin/mvim"

now when you do mvim . from a directory, it will open in MacVim

@KayDee Did you copy or move mvim from /Applications/MacVim.app/Contents/bin? That binary needs to remain where it was and you should call it directly instead of copying it.

You could either add /Applications/MacVim.app/Contents/bin to your path, or better yet, make a symlink to it. For me, I do sudo ln -s /Applications/MacVim.app/Contents/bin/mvim /usr/local/bin/mvim, but you can use other folders instead of /usr/local/bin/ if you want.

Edit: Huh, just realized the message I'm replying to is from last year. But the point still stands.

Was this page helpful?
0 / 5 - 0 ratings