In order to update the version of VIM on a Mac running on macOS, follow the below steps,
Updating VIM to the Latest Version
The first thing that we will do is check if VIM is installed on the system and what is its version. For this run the version command.vim --version | head -n 1
head -n 1 is just to get the version details back and not too much-unwanted information that we do not need.
If you get a response "zsh: command not found vim" then you do not have VIM installed on your Mac.
Next, we will certain brew commands to update VIMbrew update
brew update vim
The first command is to update the brew package manager (optional), while the second one updates VIM to the latest version available.
Finally we will run the version command again to see if we are at the latest version.% vim --version | head -n 1
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Dec 16 2022 23:29:16)
Updting VIM to a specific version
If you want to update VIM to a specific version, make use of the brew search command to know the list of versions available.
Once you have the version number, you can update to that specific version using the install command,
Note, you may have to update the ./zshrc file in order to use this version. Add the following to your zsh profile file.
You can know more by following the below links:
Have Questions? Post them here!
- How to export bookmarks from Google Chrome Browser - Chrome
- 403 forbidden error for Image - PHP
- How to Rename Docker Image with none TAG and REPOSITORY? - Docker
- Android Emulator Screenshot saved location - Android-Studio
- Java 8 Streams map() with examples - Java
- Fix: SharePoint Online Tasks App Missing - SharePoint
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools - MacOS
- How to reset Eclipse IDE Code Font - Eclipse