Computer History - Herong's Notes - Version 3.11, by Dr. Herong Yang
'vi' Miscellaneous Commands in 'ex' Line Mode
This section provides a list of miscellaneous commands in 'ex' line editing mode.
Here is a list of 'vi' miscellaneous commands:
ZZ Save and quit . Repeat the last text modifying command u Undo the last text modifying command [n]J Join the current line and the following line for n times Q Quit out of "vi" mode and go into "ex" mode. :vi Quit out of "ex" mode and go into "vi" mode.
Here is a list of 'Ex' commands that can be used in 'vi':
:q! Quit vi without saving changes. :[m],[n]s/pattern/string/g Substitute the pattern with the string of all occurrences from line m to line n. :set all Show all settings. :vi filename Start editing another file. :w Write out changes to the current file. :w filename Write out the editing file to another file. :w >> filename Write out the editing file to the end of another file. :wq Write out the changes and quit vi. :r filename Reads the content of another file into the current file after the current line.
Table of Contents