In the command mode you can move through the document, delete and correct typo, retrieve another document or quit and save the text. That is equal to write the text to a file and quit. This will leave vi without saving the file. The following is a vi cheat sheet from ULS's computing center. Top Basic vi Commands These are only a few of the many commands available in vi.
Arrow keys move the cursor up, down or sideways.
Position cursor to start of the block. Mentally count number of lines to be copied. Position cursor where the block of text is to be placed. For practice copy one of the sessions 'cp session.1a testedit' and edit the new file 'vi testedit'. Permission granted for individual usage.