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 the default terminal editor. Nano is also an excellent tool and I am not going into Nano vs Vim debate.
If you have already spent some time mastering the Vim shortcuts, you don’t have to forget them and start using a new editor.
You can install Vim on Ubuntu using the following command in the terminal:
sudo apt install vim
That’s quite simple, right? This approach’s major problem is that you won’t get the latest Vim version.
You can check the installed Vim version with the following command:
vim --version
And if you check the Vim website, you’ll find that Vim has newer versions released already.
At the time of writing this article, Vim 9.0 is released but is not available in Ubuntu repositories yet.
The good news is that you can install the latest Vim using an 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 making a backup for them.
Now, to install the latest Vim version, add the PPA repository first:
sudo add-apt-repository ppa:jonathonf/vim