How to Install the Latest Vim 9.0 on Ubuntu and Linux Mint

Brief: This quick tutorial shows the steps for installing the latest version of Vim on Ubuntu Linux.

Vim is one of the most popular terminal-based text editors. However, it is not installed by default on Ubuntu.

Ubuntu uses Nano as its default terminal editor. Nano is also a great tool and I’m not going to get into the Nano vs Vim debate.

If you’ve already spent time mastering Vim shortcuts, you don’t have to forget about them and start using a new editor.

You can install Vim on Ubuntu using the following command in the terminal:

sudo apt install vim

It’s pretty simple, right? The major problem with this approach is that you won’t get the latest version of Vim.

You can check the version of Vim installed with the following command:

vim --version

And if you check the Vim websiteyou will find that Vim has already released new versions.

As of this writing, Vim 9.0 has been released but is not yet available in the Ubuntu repositories.

The good news is that you can install the latest Vim using a Unofficial but actively maintained PPA.

Install Vim 9 on Ubuntu using a PPA

If you have specific Vim configuration files, there is no harm in backing them up.

Now, to install the latest version of Vim, first add the PPA repository:

sudo add-apt-repository ppa:jonathonf/vim
Added PPA to get the latest version of Vim

You don’t need to update the package cache on Ubuntu, but other distros like Mint may still need it:

sudo apt update

Now use the command below to install the latest version of Vim offered by the PPA:

sudo apt install vim

If you already had an older version of Vim installed, it would be updated. You can check the installed version of Vim using:

vim --version
vim 9 ubuntu
Checking the installed version of Vim

This is a very well maintained PPA available for all active Ubuntu versions.

If you are new to this PPA thing, I have a detailed guide on this topic. You should read to know more about the concept of PPA in Ubuntu.

Downgrade or delete it

If you want to go back to the old version of Vim provided by Ubuntu, you have to remove the existing version, remove the PPA and install it again.

Before removing Vim, you should copy the vimrc file or another similar configuration file if you have made custom changes and plan to use Vim again.

Very well. Open a terminal and use the following command:

sudo apt remove vim

Now remove the PPA, otherwise you will get the latest Vim again (if you try to install Vim for the old version):

sudo add-apt-repository -r ppa:jonathonf/vim

Now if you want the old official Ubuntu version of Vim, just reinstall it using the apt command.

Enjoy Vim on Ubuntu.

Become a Pro Vim user

Master Vim quickly

Master Vim quickly

Take your Vim skills to the next level with this excellent book and course by Jovica Ilic. It costs money, and if you can afford it, you’ll have a better chance of improving as a Vim user.

Buy now

We earn a commission if you make a purchase, at no additional cost to you.

Source link

Steven L. Nielsen