ZZ | Write (save) and quit file |
:x | Write (save) and quit file |
:wq | Write (save) and quit file |
:w | Write (save) file |
:w! | Write (save) file (overriding protection) |
:30,60w newfile | Write from line 30 through line 60 as newfile |
:30,60w>> file | Write from line 30 through line 60 and append to file |
:w %. new | Write current buffer named file as file.new |
:q | Quit file |
:q! | Quit file (overriding protection) |
Q | Quit vi and invoke ex |
:e file2 | Edit file2 without leaving vi |
:n | Edit next file |
:e! | Return to version of current file at time of last write (save) |
:e# | Edit alternate file |
% | Current filename |
# | Alternate filename |