DEV Community

Sami Korpela
Sami Korpela

Posted on • Originally published at samikorpela.dev

Adding Vim to Xubuntu 20.04

I recently installed Xubuntu, version 20.04 on old laptop. And I needed an editor, so I tried to run Vim from terminal. But it was not found!

There were some 3rd party repos that had the compiled binaries for the Vim, but as you can guess, they are not updated recently. So I thought to try to compile Vim from source.

Here are the steps that I was required to get the Vim working on my Xubuntu 20.04.

Getting source

Head to Vim's GitHub page where the source files and instructions for compiling are located.
Run following in the terminal to get the source code to your own computer:

git clone https://github.com/vim/vim.git
Enter fullscreen mode Exit fullscreen mode

Compiling

When you have cloned succesfully the source files, go to your vim/src directory.

cd vim/src
Enter fullscreen mode Exit fullscreen mode

Then run the following to compile the Vim

make
Enter fullscreen mode Exit fullscreen mode

Problems when compiling

If you have the same problem that I had, that after some time an error occured that said something about that:

No Terminal Library Found

So I looked up from the internetz and found this solution.

sudo apt-get install libncurses5-dev libncursesw5-dev
Enter fullscreen mode Exit fullscreen mode

After installing the missing packages, I tried to run make again and now it was successful.

Installing

As instructions says, you should install your Vim also to use it. So run the following command will do the trick:

make install
Enter fullscreen mode Exit fullscreen mode

Done

Now you should have the latest (at the time of pulling the source, compiling, installing) available version of the Vim. You can now update your Vim by doing the instructions again, but instead of cloning you should get the latest sources with:

git pull
Enter fullscreen mode Exit fullscreen mode

Happy editing with the Vim can start on your fresh Xubuntu!

Top comments (0)