next up previous contents index
Next: What's next Up: Quick Vi Tutorial Previous: Deleting text

File saving

     :w    save (write to disk)
     :q    exit

Make sure you are in command mode by pressing the tex2html_wrap8502 key. Now type :w. This will save your work by writing it to a disk file.

The command for quitting vi is tex2html_wrap8274 . If you wish to combine saving and quitting, just type :wq. There is also a convenient abbreviation for :wq -- ZZ. Since much of your programming work will consist of running a program, encountering a problem, calling up the program in the editor to make a small change, and then exiting from the editor to run the program again, ZZ will be a command you use often. (Actually, ZZ is not an exact synonym for :wq -- if you have not made any changes to the file you are editing since the last save, ZZ will just exit >from the editor whereas :wq will (redundantly) save before exiting.)

If you have hopelessly messed things up and just want to start all over again, you can type :q! (remember to press the tex2html_wrap8502 key first). If you omit the !, vi will not allow you to quit without saving.

Converted on:
Mon Apr 1 08:59:56 EST 1996