Let’s try an advanced VIM-based Text editor on Ubuntu 20.04 or 22.04 Linux by installing NeoVIM with the help of the command terminal.
Neovim text editor was created in 2014 and is a fork of the popular VIM editor that comes with modern features. The developers have designed the software to enhance the features of Vim but without reducing its speed and simplicity. The asynchronous plugin architecture is one of the key features of NeoVim. It makes the editor faster and smoother to handle the couple’s operations. Using it, the editor can run separate processes without blocking the main editor.
Therefore, without putting much stress on the system, Neovim can handle multiple windows and resource-heavy tasks such as syntax highlighting and code completion. It is available for Windows, Linux, and macOS.
Few Important features of NeoVim:
- Support Plugins to improve editor performance
- More features than traditional VIM editor
- Open-source and free
- Provide support for remote plugins, hence can use powerful cloud-based resources.
- Built-in terminal emulator to run commands directly within the editor.
- User interface that supports mouse
- Improved Syntax highlighting
- Offers API for creating and managing plugin
How to install NeoVIm in Ubuntu Linux
Let’s see the ways available to install NeoVIM for Ubuntu 22.04 or 20.04 easily without any struggle; they are Debian binary, APT package manager, Snap, and Flatpak. Also, those who are looking for some other popular editor don’t forget to look at 3 ways to install Emacs text editor on Ubuntu
#1st Method using the APT package manager
1. Start with a system update
Open your Ubuntu command terminal, we can use the keyboard shortcut for that – Ctrl+Alt+T. Once you have the terminal screen, type the given command and press the Enter key. It will update the system packages as well as refresh the APT index cache.
sudo apt update
2. Installing NeoVim Text editor
The installation of NeoVim is quite simple using the APT package manager, however, the version of the app would not be the extremely latest one instead the most stable. So, if you are alright with that, then run the given command.
sudo apt install neovim
#2nd method using Debian binary
3. Download the Debian binary
As we know the version of Neovim text editor through Ubuntu’s APT package manager is not the latest one; therefore those who want the recently available version of NeoVIM must go for its Deb binary. In your command terminal use
wget and download it.
4. Install binary on Ubuntu 22.04 or 20.04
After running the previous command, the same directory where you have executed it will have the Deb binary of NeoVIM. To check it, we can use the
ls command. Once you are confirmed that it is there run the DPKG tool to install it.
sudo dpkg -i nvim-linux64.deb
#3rd method using SNAP
5. Use the Snap package manager
Snap is another perfect tool to install NeoVIM on Linux systems, especially on UIbuntu. Because Snap comes by default enabled and ready to use without installing anything. Therefore, those who want the latest version of the text editor can run:
sudo snap install nvim --classic
#4th method using Flatpak
5. Use Flatpak to install NeoVIM
In almost all modern Ubuntu systems Flatpak can be installed using the APT package manager. So, if the above given three methods are not suitable for your case then use this Universal package manager.
If you don’t have Flatpak already, then use
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Reboot your system
Now, run the command to install the editor:
flatpak install flathub io.neovim.nvim
5. Run NeoVim on Ubuntu 22.04 or 20.04
We have learned so far the various ways to set up NeoVim on Ubuntu, however, to run it, go to All Applications and search for it. As the text editor icon appears, click to run the same.
Alternatively, we can start the editor using the terminal command:
You would also like to know how to Create a file in Ubuntu Linux using command & GUI
6. How to update it
The process to update the installed application depends upon the way we have got it. So, as per the method you have used to get NeoVIM, go for the update command:
For APT users
APT users have used the official repository, therefore running the system update command will also install any latest version if available for the software.
sudo apt update && sudo apt upgrade
For Debian Binary
Those who have installed this VIM-based text editor using the Deb binary, just need to follow the steps given in this tutorial to install it. I mean download again the binary using the same command and set it up with the help of DPKG.
sudo snap refresh nvim
flatpak update io.neovim.nvim
7. To add Python Support
If you are a Python developer and need to use it in NeoVIM, then here is the command to add Python support to this text editor.
sudo apt install python3-neovim
8. Uninstall or Remove
Because of learning curves, if you didn’t like nVIM and want to remove it, here are the commands to follow. However, if you want to give this text editor one more try then go for Vimtutor to get yourself more familiar with it.
For APT and Deb binary:
sudo apt autoremove --purge neovim*
sudo snap remove nvim
To remove Flatpak:
flatpak remove io.neovim.nvim