Neovim is the fork of popular text editor vim which aims to update the functionality and reusability with modern GUI, asynchronous job control, etc. If you are familiar with using vim then you will also find it easy to use Neovim.
The key features of Neovim text editor are –
- Supports XDG based directories
- Compatible with most of the vim plugins
- Includes a terminal emulator to run commands
- Free and opensource
In this article, I will show you the steps to install the Neovim text editor in Ubuntu. The same steps will also be applicable to other distributions based on Ubuntu
Prerequisites
You should have access to a user account that has superuser privileges.
How to install Neovim
There are various ways using which you can install Neovim in your Ubuntu system. Use any one of them to install it on your system.
Method 1: Installing Neovim from the Ubuntu repository
The Neovim package is available in the Ubuntu repository you can install it by executing the given command in your terminal.
Run update command before installing Neovim –
sudo apt update
And then use –
sudo apt install neovim
Press y and then Enter when it asks for your confirmation.
Method 2: Installing Neovim using Snap
Snaps are containerized packages that can be used across the different distributions of Linux. This is one of the easiest methods of installing packages on a Ubuntu system.
Now to install the Neovim stable snap package on your system use –
sudo snap install --beta nvim --classic
Method 3: Installing Neovim using AppImage
The AppImage is a universal package format that runs on most Linux systems without installation. First, use the following command to download the Neovim AppImage package.
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
Once it gets downloaded make the file executable by using the given command –
chmod u+x nvim.appimage
Finally, run the application by using the following –
./nvim.appimage
Method 4: Installing Neovim using Flatpak
Flatpak is another way of building, distributing, and running sandboxed desktop applications on a Linux system.
To download the Neovim Flatpak package first you need to install and configure Flatpak on your system. To install Flatpak open your terminal and execute the given command –
sudo apt install flatpak -y
Next, add the Flathub repository by using the given command –
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Now use the given command to install the Neovim Flatpak package –
sudo flatpak install flathub io.neovim.nvim
Start Neovim text editor in Ubuntu
After the installation of Neovim on your system you can launch it from the activity dashboard. Search Neovim and when an icon appears like given in the image below click on it to launch the application.
The Neovim will start in your terminal.
Press :
and then enter help nvim
to view the help on Neovim.
For usage of Neovim editor, you can read Nvim documentation.
Conclusion
You have successfully installed Neovim on your system. If you know how to use Vim then using Neovim is very easy else if you don’t know how to use it then you can follow Nvim documentation to start using it.
Now if you have a query then write us in the comments below.