(1) VI is used in three ways
command line mode text mode last line mode
(2) command line mode can copy, delete, paste, insert, undo operation
Copy command:
<1> yy | YG indicates the line where the cursor is copied
<2> Nyy (parameter n means copying a few lines)
<3>ygg copy from cursor line to first line
Paste command:
<1> p means paste
Delete command:
<1>DG | DD Delete a row
<2> ndd (parameter n means to delete several rows)
<3>DGG Delete cursor line to first line
<4> x means delete one character
Insert command:
<1> o means jump to the next line where the cursor is inserted
<2> O means jump to the previous line where the cursor is inserted
<3> A indicates the entry starts from the next position of the character in the cursor
<4> A Indicates the entry starts at the end of the line where the cursor is located
<5> I indicates the entry starts at the previous position where the cursor is located.
<6> I indicates input from the beginning of the cursor
Undo command:
<1> u means undo last time
<2> u means to revoke all
(3) The last line mode can be saved, manipulated, replaced operation
Save command:
Use of VI Editor on Linux