In order to update the version of VIM on a Mac running on macOS, follow the below steps,
Updating VIM to the Latest Version
Step 1:
Step 2:
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.
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.
Step 3:
Next, we will certain brew commands to update VIM
The first command is to update the brew package manager (optional), while the second one updates VIM to the latest version available.
Step 4:
Finally we will run the version command again to see if we are at the latest version.
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.
or,
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:
- https://www.vim.org/download.php#mac
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!