[Novalug] :wq vs ZZ

Howard L how0909@freeshell.org
Fri Dec 16 11:54:25 EST 2016


On 12/14/2016 11:29 AM, James Ewing Cottrell III via Novalug wrote:
> it's not always easy to remember what you were editing and why, or 
> even if it was modified. Indeed, one could argue that perhaps ":q" is 
> the right thing, but often what is desired is "write if modified, else 
> quit", exactly what ":x" or "ZZ" does. 

If I type :q and get "E37: No write since last change (add ! to 
override)" and I don't remember whether I just mistakenly typed 
something into that window or not

I do 'u' which undoes the last change.

then do ctrl-r to redo that undo and see what it was. Repeat as necessary.

I always do :q, :q! or :wq. Didn't know about the zz et al and have no 
room in memory for them. I try to keep it simple.


More information about the Novalug mailing list