Vim, NVIM and More

What you will be learning

Check out event 1 documentation, for installation guide for WSL.
You can use ctrl+c and ctrl+v to copy and paste anything in wsl.

NeoVIM has many features which will help you work faster but also make you lazy so make sure you have spent significant amount of time with VIM before starting out with neovim.

NVIM

NeoVIM is basically VIM but modified, so all the VIM commands are valid in NeoVIM. It supports a variety of plugins and one of the main advantages of using it is that the developers of NeoVIM are actively working on it and the plugins for NeoVIM are more powerful then VIM.

How NOT to install NVIM

If you are familiar with command line than you will be tempted to type sudo apt install neovim.
But the thing is apt has its own set of advantages and disadvantages. As mentioned in the pre-requisites apt is a package managing software so you can directly install the required software you want. But the disadvantage of it is that the apt command should be updated by someone every time a new update for any software comes up which is really hard to keep up. So apt can install a old version of the software you want.
You can check for the the software you will be installing using apt-cache policy <package_nm> or in this context:

apt-cache policy neovim

You can type in the above command in your wsl to check which version of neovim will apt be installing if you had typed sudo apt install neovim.
Compare it with the latest stable release from the official neovim github page. They both should differ.

How to install NVIM

Since we can’t use apt, we will be extracting the compiled source code downloaded from the NeoVIM github page.

mkdir ~/.local
mkdir ~/.local/bin

(This will create a directory called bin within .local)

tar xzvf nvim-linux64.tar.gz
rm -fr nvim-linux64.tar.gz

(The above commands will extract the zipped file and delete the it)

ln -s ~/.local/bin/nvim-linux64/bin/nvim ~/.local/bin/nvim
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

(The first line will add the address and second line will reload the .zshrc so that the changes start affecting.)
Now if you enter nvim --version it will run successfully and display you the version.

Credits: secuRIT Core :)

Edit this page