vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs.
Straight from Wikipedia.
Let's see what it looks like
Commands
x
i
a
d
operator [number] motion
e.g. d2w
A short list of motions:
w - until the start of the next word, EXCLUDING its first character.
e - to the end of the current word, INCLUDING the last character.
$ - to the end of the line, INCLUDING the last character.
Source: vimtutor
Undo (u)
Redo (Ctrl + R)
Save (:w)
Exit (:q)
A few more commands:
The magical .vimrc
Why vi?
vi is guaranteed to exist on most Linux systems.
It's much quicker to use vi for a sudo edit:
$ sudo vi
Read this and more: https://stackoverflow.com/questions/597077/what-are-the-benefits-of-learning-vim