Vigil wrote:
I wonder why some people use :wq instead of ZZ. Maybe they just don't
know about ZZ? Obviously that's not the case with Bram.
On Tue, 13 Feb 2007, Bram Moolenaar wrote:
:wq
Vim often has several ways to do the same thing. The best way is whichever
suits you best: there is no "best way" in abstracto. In this case there are
several related commands:
:x[it]
:exi[t]
ZZ
write if modified, then close window; quit if last window
:wq
write always, then close window; quit if last window
:q[uit] (with 'autowriteall')
becomes same as :x
Even though I have 'autowriteall' set, I use ":x" if the window is modified,
otherwise ":q". Yes it means (typing one-handed) moving the hand from the
colon (penultimate key at bottom right, no shift), to the x (third key at
bottom left, after < and w) or to the q (far left on middle row, next to Caps
Lock) then back to the Enter key; but I learnt piano (which I haven't kept up
:-( ) before I had a typewriter, and never learnt to type without moving
hands, so that's not a problem for me (ever seen a pianist play without moving
hands? :-} ). I never learnt ZZ which is not mnemonic to me; and on my AZERTY
keyboard there is no "rolling movement" either.
Best regards,
Tony.
--
Never try to outstubborn a cat.
-- Lazarus Long, "Time Enough for Love"