Home » How To » How to Install Latest Vim Editor in Linux

How to Install Latest Vim Editor in Linux

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 installations doesn’t include vim editor default. This tutorial will help you to install Vim text editor on your Linux system.

Here are some of the extended vim features:

  • Supports multi-level undo tree
  • Vim provides an 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 the below method to install Vim using source code.

Related:  How to Search Files with Case-Insensitive Names in Linux

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 into your Linux system.

Follow the below steps to compile Vim from source code:

    1. First of all, install the 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
    2. Download the latest Vim source code from the Github repository.
      git clone https://github.com/vim/vim.git 
      cd vim/src
    3. Configure the source code according to your system environment.
      ./configure 
    4. Compile and install Vim from Source code on your Linux system.
      sudo make
      sudo make install 
    5. Finally, Open Vim text editor on your system.
      vim 

Install latest Vim version

That’s it. You have successfully installed the latest Vim on your Linux system. Feel free to use the comment section in case of any query 😎

Leave a Comment