Reputation: 33
I installed macvim with homebrew and when i tip "mvim file" in terminal open the file in another window. Can I fix and open mvim in terminal?
Upvotes: 2
Views: 2241
Reputation: 1558
We want the contents of the MacVim.app package to be in the PATH, but do this cleanly. So here's what I do:
cd /Applications; ln -s ../usr/local/Cellar/macvim/8.1-151_1/MacVim.app
That gets you MacVim in /Applications, via a symlink that can be updated when the package is upgraded. Then add this to the PATH in the shell startup file:
PATH=/Applications/MacVim.app/Contents/bin:$PATH
Then when you upgrade you just change the symlink in /Applications and everything still works nicely.
Upvotes: 0
Reputation: 5786
The binary is needed by some plugins (YouCompleteMe), for one.
You can use the binary that is installed with macvim. By default, it's
/usr/local/Cellar/macvim/8.0-144_3/MacVim.app/Contents/MacOS/Vim
You can simply alias vim to it in your shell config (.bashrc
, .zshrc
, etc.)
alias vim=/usr/local/Cellar/macvim/8.0-144_3/MacVim.app/Contents/MacOS/Vim
Upvotes: 1
Reputation: 822
MacVim (mvim) is not a terminal application. If you want to open vim in a terminal, just use "vim" instead.
Upvotes: 0