Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!milton!ogicse!intelhf!ichips!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.editors Subject: Re: : wq (Re: One user's editor wish list) Message-ID: <1991Mar29.162034.12996@chinet.chi.il.us> Date: 29 Mar 91 16:20:34 GMT Article-I.D.: chinet.1991Mar29.162034.12996 References: <1991Mar25.191821.11019@scrumpy@.bnr.ca> <2900@wn1.sci.kun.nl> <1991Mar28.155305.8204@vpnet.chi.il.us> Organization: Chinet - Chicago Public Access UNIX Lines: 25 In article <1991Mar28.155305.8204@vpnet.chi.il.us> dattier@vpnet.chi.il.us (David W. Tamkin) writes: >That alone would be reason to use :wq, except that in the versions of vi I've >used, :wq also skips the write if the [Modified] flag is off; I have to use >:w and then :q to get around it. Even setting autowrite and writeany doesn't >help. If only vi didn't clear the [Modified] flag when you write to an >outside file; that's the real problem. Actually there is an easy work-around for this. Just remember to do a :w before you :w other_file. That keeps the file consistent with the modified flag. [:x] >| - it gives you a second chance if the write failed >It does? I didn't know that. The only time a write ever failed on me the >whole system locked up and I lost all my changes anyway, and I wasn't trying >to quit vi, just to :w to save the changes so far. It won't fix a system crash of course, but you can recover from things like not having write permission or file system full errors if you can save a copy somewhere else. :wq exits regardless. Les Mikesell les@chinet.chi.il.us