Exit commands
ZZWrite (save) the file if modified, and quit file
:xWrite (save) the file if modified, and quit file
:wqWrite (save) the file unconditionally, and quit the file
:wWrite (save) the file
:w!Write (save) the file, overriding protection
:30, 60w newfileWrite from line 30 through line 60 to newfile
:30, 60w>>fileWrite from line 30 through line 60 and append to file
:w %.newWrite current buffer named file as file.new
:qQuit file
:q!Quit file, overriding protection
QQuit vi and invoke ex
:e file2Edit file2 without leaving vi
:r newfileRead contents of newfile into current file
:nEdit next file
:e!Return to version of current file at time of last write (save)
:e #Edit alternate file
:viInvoke vi from ex
:Invoke one ex command from vi editor
%Current filename (substitutes into ex command line)
#Alternate filename (substitutes into ex command line)
^]Look up the location of the identifier under the cursor in the tags file and move to that location. If tag stacking is enabled, the current location is automatically pushed onto the tag stack.
^TReturn to the previous location in the tag stack, i.e. pop off one element