Neovim is a text editor for creating and editing text files via command line. Neovim is a fork of Vim text editor. Development of Neovim was started from a copy of Vim repository. Neovim retains the features of Vim, and also introduces new features. Neovim is focused to improve plugin architecture, performance, and user experience.
This tutorial demonstrates how to install Vim on Ubuntu 22.04.
Install Neovim
Update the package lists:
sudo apt updateInstall Neovim by running the following command:
sudo apt install -y neovimOnce the installation is complete, you can check Neovim version:
nvim --versionTesting Neovim
To create a new file or edit an existing file, run nvim command and provide filename as argument:
nvim test.txtRun the command as a superuser if missing required permissions.
sudo nvim /var/log/dpkg.logThe file is opened in read-only mode. To edit the file, switch to insertion mode by pressing the letter i. When finished editing the file, exit the insertion mode by pressing ESC key. To save the file and exit Neovim, type :wq command and press the Enter key. Type :q! command, to exit without saving.
 
Uninstall Neovim
To completely remove Neovim and related dependencies, run the following command:
sudo apt purge --autoremove -y neovimYou can also remove Neovim data:
rm -rf ~/.local/share/nvimsudo rm -rf /root/.local/share/nvim 
             
                         
                         
                        
Leave a Comment
Cancel reply