I have MacVim installed and I am trying to set it up as the editor for Git (version control), but I can\'t run \'mvim\' from the command line as it isn\'t recognised. How d
For Mac .app
bundles, you should install them via cask, if available, as using symlinks can cause issues. You may even get the following warning if you brew linkapps
:
Unfortunately
brew linkapps
cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper".app
bundles that can be relocated. Instead, please consider usingbrew cask
and migrate formulae using.app
s to casks.
For MacVim, you can install with:
brew cask install macvim
You should then be able to launch MacVim like you do any other macOS app, including mvim
or open -a MacVim
from a terminal session.
UPDATE: A bit of clarification about brew
and brew cask
. In a nutshell, brew
handles software at the unix level, whereas brew cask
extends the functionality of brew
into the macOS domain for additional functionality such as handling the location of macOS app bundles. Remember that brew
is also implemented on Linux so it makes sense to have this division. There are other resources that explain the difference in more detail, such as What is the difference between brew and brew cask?
so I won't say much more here.