One of the commonly used editors under Linux is VI.
VI There are basically 3 modes available: General mode, edit mode, command line mode.
1) General mode
VI open a file directly into the general mode, the default is the general mode.
In general mode, we can use the left and right keys to move the cursor, to achieve viewing, you can delete the characters or delete the whole line, we can also copy and paste the file data. In general mode, press ": Wq" to save and leave.
2) Edit mode
VI after opening the file, press I, O, A, R (uppercase and lowercase) to enter edit mode. Insert or replace appears at the bottom left of the interface and can be edited. Pressing ESC will exit edit mode and return to normal mode.
3) command-line mode
VI into the general mode, press:/? Any one of these 3 characters enters the command line mode and the cursor moves to the bottom row. In this mode, we can find data, read, save, replace characters. pressing ESC will exit edit mode and return to normal mode.
Note: There is no switch between edit mode and command line mode.
VI Program Editor