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
Compiling
When you have cloned succesfully the source files, go to your vim/src
directory.
cd vim/src
Then run the following to compile the Vim
make
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
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
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
Happy editing with the Vim can start on your fresh Xubuntu!
Top comments (0)