Vim (Vi Improved) is a highly configurable command line text editor for Unix like systems. It is originally cloned with VI POSIX standard editor with additions.
Vim comes standard with most modern Linux distributions, but some of the minimal installation doesn’t include vim editor default. This tutorial will help you to install Vim text editor on your Linux system.
Here are a some of the extended vim features:
- Supports multi-level undo tree
- Vim provides extensive plugin system
- Provide support for hundreds of programming languages and file formats
- Powerful search and replace options
- Provides integration with multiple tools
How To Install Vim in Linux
In most modern Linux distributions, you can install Vim editor from the default repositories using the package manager, but the available version you will get is a little older.
- On Ubuntu Debian and LinuxMint
sudo apt install vim
- For CentOS, RHEL and Fedora
sudo dnf install vim
- On Arch Linux and Manjaro Systems
sudo pacman -S vim
- OpenSuse Systems
sudo zypper install vim
You can default package manager on other Linux distributions to install Vim. If the latest Vim version is not available, use below method to install Vim using source code.
Compiling Vim Using Sources Code
On some of the Linux distributions, the latest Vim may not be available under the official software repositories. Then, you can download the Vim source code from Github and compile it your Linux system.
Follow the below steps to compile Vim from source code:
- First of all, install required packages on your system:
sudo apt install git make ncurses-dev build-essential
#On Debian systems
sudo yum install git make ncurses-devel
#On Redhat systems
- Download the latest Vim source code from Github repository.
git clone https://github.com/vim/vim.git
- Configure the source code according to your system environment.
- Compile and install Vim from Source code on your Linux system.
sudo make install
- Finally, Open Vim text editor on your system.
That’s it. You have successfully installed latest Vim on your Linux system.
In this tutorial, you have learned to install latest Vim on Linux systems. Also includes instructions to compile Vim from source code and install.