Exiting vi


Exiting vi

Whew! Time to exit vi (Figure 4.16).

Figure 4.16. Use :q! to quit vi without saving changes.


To Exit vi:

  • :q

    Enter command mode with q, then type :q to quit vi. If you haven't saved your latest changes, vi will not quit and will tell you to use ! to override. To quit without saving your changes, use :q!, as shown in Figure 4.16.

Tips

  • If you don't really want to quit but want to edit a different file instead, type :e filename to open a new file to edit.

  • We recommend that you take a few minutes and try out some of the commands that you'll use throughout your vi experience. If you don't think you'll be needing this range of commands, consider using pico rather than vi.

  • It takes some practice to get accustomed to vi, but the time spent is well worth it. With patience and practice, you'll quickly become proficient in using vi. Take your time, take deep breaths, and plow ahead.





Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net