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
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- How to add Colors to VIM (syntax highlighting)
- How to perform Find and Replace using vim Editor
- How to update VIM version on a Mac
- How to Select All Text in Vim/Vi editor
- Guide: Install Vim on Mac
- The Vim (vi) Mac Configuration File Details
- Fix :wq! Vi Error - E32: No file name (when write and quit)
- How to Copy all text to Clipboard in Vim
- How to Uninstall Vim on Mac?
- Be right back We’re making updates to the Apple Store. Check back soon. - Apple
- How to install XML Tools Plugin Notepad++ - NotepadPlusPlus
- Mac: How to quit Jupyter Notebook from Terminal - MacOS
- Save Java Object as JSON file using Jackson Library - Java
- SQLite with Android Easy to Understand Tutorial that covers Select, Insert, Update and Delete - Android
- Fix: rust-analyzer failed to discover workspace [Visual Studio Code] - Rust
- Float built-in function in Python - Python
- How to Make Google.com the Default Homepage on Safari on Mac - MacOS