Overriding system vim on Mac
15,694
Solution 1
The symlink looks fine. Try to restart your terminal. Could be some caching issue.
Solution 2
The system vim is in /usr/bin. If your path has /usr/bin before /usr/local/bin, you would get the system vim. Check your path with "echo $PATH" in the terminal.
Author by
Levi
Updated on June 02, 2022Comments
-
Levi almost 2 years
I installed macvim via
brew install macvim --override-system-vim
. All appears to be well. When I do anls -lart
on/usr/local/bin
here is what I get for the symlinks relative tovim
:vimex -> ../Cellar/macvim/7.3-66/bin/vimex vimdiff -> ../Cellar/macvim/7.3-66/bin/vimdiff vim -> ../Cellar/macvim/7.3-66/bin/vim view -> ../Cellar/macvim/7.3-66/bin/view vi -> ../Cellar/macvim/7.3-66/bin/vi mvimex -> ../Cellar/macvim/7.3-66/bin/mvimex mvimdiff -> ../Cellar/macvim/7.3-66/bin/mvimdiff mvim -> ../Cellar/macvim/7.3-66/bin/mvim mview -> ../Cellar/macvim/7.3-66/bin/mview gvimex -> ../Cellar/macvim/7.3-66/bin/gvimex gvimdiff -> ../Cellar/macvim/7.3-66/bin/gvimdiff gvim -> ../Cellar/macvim/7.3-66/bin/gvim gview -> ../Cellar/macvim/7.3-66/bin/gview
Additionally, running
which vim
yields/usr/local/bin/vim
. However, when I runvim
from terminal I get version7.3
rather than7.3.754
that I get when I run/usr/local/Cellar/macvim/7.3-66/bin/vim
directly. What am I missing here, as it is obviously not the same. -
Blanka about 11 yearsbash was probably hashing (i.e. caching) your old PATH. Restarting the shell fixes it, but if you're ever in that situation again just do
hash -r vim
to clear the cache for vim.