How to upgrade system default vim? Finally, vim 8.0 has been released! However, the pre-installed vim is vim 7.3 on my system(OS X El Capitan), and I want to upgrade it to the newest 8.0 version. 

So how can I do this without messing things up? Would it be a good idea to simply override the vim in /usr/bin/vim? And what about compiling it from source?
Get the Homebrew* package manager.

Install vim formula (as of today it is Vim 8.0.2) with:

brew install vim


Check the messages it produced for any manual actions you might be required to perform, although with Vim formula there should be no issues.

One more thing you should do is to check your environment variables for those that might contain a full path to the system vi/vim, like EDITOR and update them to use the /usr/local/bin/vim.



If you had Homebrew already installed, before running the install command, update the local repository with:

brew update


If you had Vim already installed with Homebrew (or if in the future you'd like to upgrade the Vim version), then run:

brew upgrade vim




* Homebrew is an open-source, actively maintained package manager for Mac OS X. It keeps the packages in /usr/local/Cellar folder by default. It stores links to the executable files /usr/local/bin and puts this directory ahead of system directories in the PATH environment variable. Your /usr/bin/vim can thus be left alone.

Homebrew will also take care of all the paths and dependencies for installed packages.