VI stands for VISUAL, it’s a very easy to use text editor.
So, here are some most commonly used commands:
x delete a character at the current cursor
dd delete a line
[colon]w write buffer to file
[colon]x! write buffer to file and exit
[colon]q! do not write buffer to file and exit
/abc search the string ‘abc’ forward
?abc search the string ‘abc’ backward
For more, just check Advanced Vi Cheat Sheet.