Exit Commands

ZZWrite (save) and quit file
:xWrite (save) and quit file
:wqWrite (save) and quit file
:wWrite (save) file
:w!Write (save) file (overriding protection)
:30,60w newfileWrite from line 30 through line 60 as newfile
:30,60w>> file

Write 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
:nEdit next file
:e!Return to version of current file at time of last write (save)
:e#Edit alternate file
%Current filename
#Alternate filename
1
Hosted by www.Geocities.ws