VI command (essential)
I think this commands essential, because with this (only eight) commands you can create and edit various files with VI
i Insert new text, before the cursor.
escape/ESC
Once you’ve entered input mode using the one of the a, i, O or o commands, use escape or ESC to quit entering text and return to command mode.
yy Copy the line the cursor is on
dd Delete the line the cursor is on.:w
Write the file back to the file with the name that you originally used as an argument on the vi command line.
:w or :w!
Write the file back to the file with the name that you originally used as an argument on the vi command line.
:w file_name
Write the file back to the file with the name “file_name”.
:q!
Quit, discarding any modifications that you may have made.
:wq!
Write the file back to the file with the name that you originally used as an argument on the vi command line and Quit






Add a Comment