the vi Text Editor (3)
Enter a lowercase letter w to write, or save, a copy of the new file in your current, user directory.
type a colon (:) and enter the wq command. The wq command writes the file, quits the editor, and returns you to the shell prompt.
x delete current character
:w save current file. :q! quit without saving.
:wq save current file and quit editing.