Pre-requisites for installing NeoVIM

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.

APT

You might have used many commands with apt even if you are a newbie. Like

sudo apt update
sudo apt install curl

The formal definition is that apt is a package manager. So in simple words conventionally, if you want to install any software for example neovim than you have to build the software using the written code yourself. This sometimes takes a lot of time so in order to tackle that problem geeks introduced apt so apt does all the above work for you and you just have to wait for it to install which is much easier and time efficient.
You can go ahead and type in sudo apt update and hit enter. Now the terminal will check for updates in apt and shows them to us. If you want to install those updates you can enter sudo apt upgrade.
So you have learnt what apt is and how can we use it.

Path

Enter the following command in wsl

echo $PATH

This will give you a bunch of addresses.
Now enter the following command

date

this will display the date and the time. You can see that you haven’t entered where to search for date when you enter the command. Well the terminal looks for date function inside a set of predefined addresses which are displayed why you type echo $PATH. So when you type in date and hit enter, the terminal will search for date function in the all the address from PATH and run it.
You can verify this by entering

which date

this will give you the address from where date is run from. You can verify that the address is present in the path( from echo $PATH).
Note: You can add addresses to the PATH.

Vi, VIM And NVIM

Vi, VIM and NVIM are text editor just like VSCode, Sublime Text, etc. but it is run on command-line. So you can edit codes in command line itself. You might have used Vi or VIM in your lab.
Vi is the oldest of them all.
VIM( Short for Vi IMproved) was introduced later with more exciting features.
NVIM( Short for NeoVIM) was created after VIM.

Advantages-

vimtutor

or from this video from MIT( recommended).
Note: When you type "vi <filename with extention>", the command line by default, opens the file in VIM itself and not vi.

Extraction software

We will learn about extracting zipped files in this section.
There are many ways to convert a directory to zipped. We will be discussing about TAR( Tape ARchives). Tar is a built in extracter and converter for wsl or any UNIX terminal, sometimes also referred as tarball.
In tar you can combine different files into a single zipped file. There is no compression involved here. Its like taping archives( files in this case) together and hence the name.
For example, download the following sample.tar file created by secuRIT. This .tar file contains previous events/documentation details.
To extract the file, go to the directory where the file is downloaded and run the following command

tar xf sample.tar

(xf is the argument which tells extract the file)
This will extract the files into the current directory.
You have successfully extracted a zipped .tar file using wsl.
Now since you know VIM, open the Event 1.html from the sample.tar in VIM using vim Event1.html. Now you can try out the commands and make changes in the file. VIM and NVIM can open almost any type of file( .txt, .cpp, .c, .html, .css and much more).
Note: tar is usually used with compression to make compressed tar files. They usually have the extention .gz, .bz2, .xz. Installation releases are usually spread using .tar.gz files in the open source community.

Credits: secuRIT Core :)

Edit this page