Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!cbnewsk!noraa From: noraa@cbnewsk.att.com (aaron.l.hoffmeyer) Newsgroups: comp.editors Subject: Re: :wq (Re: One user's editor wish list) Message-ID: <1991Apr1.094106.26188@cbnewsk.att.com> Date: 1 Apr 91 09:41:06 GMT References: <1991Mar25.191821.11019@scrumpy@.bnr.ca> <2900@wn1.sci.kun.nl> <1991Mar29.160622.5445@informix.com> Organization: AT&T Bell Laboratories Lines: 42 In article <1991Mar29.160622.5445@informix.com> dberg@informix.com (David I. Berg) writes: >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. The same thing happened to me in 1987 - the last I used ZZ also. I tell everyone to use :wq or :w or :q or :next or :rewind etc. - tell vi exactly what you want to do. No ZZ for me, thank you. Yes :wq is three keystrokes, and ZZ might be faster, but I actually think about the :wq when I type it. I often edit 10 files or more at a time, so I don't want to write and quit, I just want to write and move to the next file. Aaron L. Hoffmeyer TR@CBNEA.ATT.COM