Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!ucbvax!hplabs!pyramid!infmx!dberg From: dberg@informix.com (David I. Berg) Newsgroups: comp.editors Subject: Re: :wq (Re: One user's editor wish list) Message-ID: <1991Mar29.160622.5445@informix.com> Date: 29 Mar 91 16:06:22 GMT References: <1991Feb22.134323.20410@scrumpy@.bnr.ca> <1991Mar25.191821.11019@scrumpy@.bnr.ca> <2900@wn1.sci.kun.nl> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. Lines: 29 In article <2900@wn1.sci.kun.nl> hansm@cs.kun.nl (Hans Mulder) writes: >In article <1991Mar25.191821.11019@scrumpy@.bnr.ca> bnrmtl!lewis@larry.mcrcim.mcgill.edu (Pierre Lewis) writes: >>1) vi commands :w :q and :n >>........ > >The :wq command was a mistake and should be expelled from vi ASAP. > >For one thing, it invites the mistake Pierre described above. >Plus, the :x command is superior: >- it skips the write if the buffer was not [Modified] >- it gives you a second chance if the write failed >- it's shorter :-) >- ZZ is mapped to :x. Let me tell you about ZZ. Once upon a time a system crashed during a long and arduous edit session. When the system came back up, I successfully recovered my file with vi -r, but had other things to do just then, so I autumatically entered ZZ and went on with my business. Because ZZ had become such an autonomous keystroke, it never occurred to me that because I had not modified the buffer during the vi -r session the file would't be saved. Later, when I went back to edit my file, guess whose prior arduous changes were conspicuous by their absence. I have never used ZZ since, will never use it in the future, and thank vi for :wq. ___ ___ dberg@cougar.informix.com / ) __ . __/ /_ ) _ __ Informix Software Inc. (303) 850-0210 _/__/ (_(_ (/ / (_(_ _/__> (-' -/~ (_- 5299 DTC Blvd #740; Englewood CO 80111 {uunet|pyramid}!infmx!dberg The opinions expressed herein are mine alone.