VIM is a text editor in the terminal, which is a improved version of VI. This is why many developers and system administrators prefer to use it rather than the reasons for the nano.
Ubuntu 20.04 is the latest LTS version of Ubuntu, but it has been released for two years, and some programs have passed. That’s why many people prefer to use this moment to update some applications.
One of the applications is Vim, although its development speed is slow, but it is constant and often showing us a new stable version, which has been loaded with important improvements.
Therefore, in this article, Xiaobian will show you how to do this by compiling VIM’s source code (successful in the server environment) to achieve a stable and secure binaries. In addition, install it in a directory of our directory so that we will not have system problems.
Get the latest version of VIM by compiling the source code
First, before the beginning, it is necessary to ensure that the VIM is installed on the system.
After that, since the source code is compiled, the base package is required to complete it. This can be done by running the following command.
In addition, VIM requires a name-based package NCURSES-DEV, you must install it and unzip the source code, so you need UNZIP.
Create a dedicated folder for Vim installation. It can be located in any path you want, support any name you want.
Now download the VIM source code WGET through the command.
Access the generated folder:
Then go to the folder where the source code is located:
And continue to configure it using a directory that does not require root privileges. Although this is not mandatory, it is recommended to do so.
Then compile the code
Finally, it is installed by generating binary files.
Vim has been installed and has already generated binary, but now we need to add my specified directory to the Path.
To do this, edit the file ~ / .bashrc.
Nano ~ / .bashrc
And add it to the end of the file.
ExportPath = / Home / Angelo / Vim / Bin: $ PATH
Remember to replace it with the address you specified
Save the changes and turn off the editor.
Changed by running application
Source ~ / .bashrc
Run the VIM command now.
You will see the following screen.
Complete the above steps, you can get the latest version of Vim on Ubuntu 20.04, how, is it very simple.
In this article, Xiaobian briefly describes how to compile VIM source code to get the latest stable version, and the small partner you need can set it with the above tutorial.