What's the vi commands function?
vi [file_name]
Starts vi and immediately begins working on the named file (either a new file or an existing file). Type the vi command at the shell prompt.
vi
Starts vi. Type the command at the shell prompt.
Insert key
Toggles between the insert and replace modes while in edit mode.
Delete key
Deletes test.
q!
Exits vi without saving
z
Exits without saving
:
Enter command line mode from command mode.
Esc key
Enter command mode from edit mode.
Insert key i s
Enter insert mode from command mode
q
Exists vi. This produces an error if the text was modifies.
w [file_name]
Names and saves the file.
w! [file_name]
Overwrites the file .
w
Saves the current document.
wq or exit
Saves the document and exits vi