next up previous contents index
Next: vi Command Mode Up: vi Previous: Starting vi

Exiting vi

The vi command to exit and save edits is ZZ. You can also use the ex command :wq to exit and save the edits. Unlike vi commands, the ex  commands, introduced by a ':', require a <Return> after the command. To exit vi without saving your changes, use the ex command :q!.



Alan Silverman
Wed Apr 12 16:54:02 METDST 1995