How update vim to 8.0 version in OSX?
Solution 1
You may have compiled vim, but the vim
that's first in your path is still the system vim. You can show that using:
$ which vim
/usr/bin/vim
You can either call your compiled vim directly (probably in a folder called dist
or bin
), or put it in a place that is before /usr/bin
in your $PATH
variable. The easiest way to get an up-to-date vim on OS X is to use Homebrew:
$ brew install vim --with-override-system-vi
Solution 2
Trying
brew install vim --override-system-vim
didn't work for me either.
Upgrade Homebrew to latest version and then use
brew upgrade vim
Solution 3
vim --version
$ brew install vim --with-override-system-vi
Sounds dumb but most importantly close the terminal and then reopen it to see the new version of vim $ vim --version
.
Solution 4
You are missing the final step for installing from source after running make
:
sudo make install
That should install it to your path.
Ladih
Updated on July 09, 2022Comments
-
Ladih almost 2 years
The current vim i'm using is 7.3 version.
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 14 2016 16:06:49) Compiled by [email protected]
I tried to update vim to 8.0 by the command:
git clone https://github.com/vim/vim.git cd vim/src make
However, it doesn't work. It's still vim 7.3.
-
Keith Thompson over 7 yearsWill that install vim 8.0? (I.e., does Homebrew know about the latest version yet)?
-
L3viathan over 7 yearsHomebrew is usually very up-to-date, so yes, you'll get vim 8 (I have it too).
-
Ladih over 7 yearsI tried this method, and installed vim 8.0 successfully. However, the vim is in still 7.3 version. So I set an alias to vim 8.0 in that folder.
-
jshort over 7 yearsPut /usr/local/bin first in your path. And brew is on it's 4th or 5th minor version update of vim 8 (8.0.0019 as of just a few days ago).
-
Admin over 7 yearsI've just tried the
brew install vim --override-system-vim
command but it updated vim to the version 7.4, not 8 -
James Hulse about 7 yearsThis updates the command
vim
on my mac and notvi
. To pointvi
to the latest version I had to addalias vi="vim"
to my bash configuration.bashrc
/.zshrc
. -
thenew about 7 years
Warning: vim: this formula has no --override-system-vim option so it will be ignored!
-
wting about 7 yearsThis is supposed to be:
brew install vim --override-system-vi
(nom
at the end). -
oalders almost 7 yearsLooks like it's now
brew install vim --with-override-system-vi
-
UtsavShah almost 7 yearsYou don't need to upgrade Homebrew, it'll update itself automatically
-
Steven Aguilar over 6 yearswhen I run
vim
in the command line version 7.3 is shown. However, when I runbrew upgrade vim
I getError: vim 8.0.0728_1 already installed
How do I switch to version 8? -
AnthonyB over 6 yearsIt didn't override the
/usr/bin/vim
in my case, perhaps I should usesudo
. Instead I usedsudo ln /usr/local/Cellar/vim/<myVimVersion>/bin/vim
/usr/bin/vim` -
Hafenkranich over 6 years@Steven Angular I had the same problem. Re-opening the console solved this.
-
avriis over 6 years@GerardoZinno Had the same issue, but realised that it was an issue with home brew (I have an old version, which I discovered with brew -v). See this thread on home brew support for how to fix this: discourse.brew.sh/t/how-to-upgrade-brew-stuck-on-0-9-9/33
-
Jasha almost 6 yearsUsing the homebrew formula above, I now have vim 8.0 at
/usr/local/bin/vim
and vim 7.3 at/usr/bin/vim
. Any recommendations for how to rearrange my path? Or should I delete/usr/bin/vim
and replace it with a symlink? -
L3viathan almost 6 yearsWhen you start vim, is the correct Vim started? If yes, leave it be, you should not delete the system Vim. If no, adjust your path e.g. by putting
export PATH="/usr/local/bin:$PATH"
in your.bashrc
,.zshrc
, or similar. -
naiJenn over 4 yearsworked without using --with-override-system-vi as it is an invalid option.
-
pjo336 almost 4 yearsGod bless the sounds dumb addition, I was dumb