Technical data
Using a Text Editor
7-12
Leaving vi
You can quit vi and save your work. You can also quit vi without saving your work.
Your document must be in command mode for you to be able to use the following
commands to leave vi. Press the < ESC > key to ensure that your document is in
command mode.
• ZZ
• :wq
• :q!
Both the ZZ and :wq commands save your file and leave vi. You execute fewer
keystrokes by using the ZZ command.
The q! command causes your document to leave vi without saving your changes.
Refer to A Beginner’s Guide to Text Editing for more detailed information about vi.










