if v:version < 700
cnoreabbrev W w
cnoreabbrev Wq wq
+ cnoreabbrev Wqa wqa
else
cnoreabbrev <expr> W
\ ((getcmdtype() == ':' && getcmdpos() <= 2) ? 'w' : 'W')
cnoreabbrev <expr> Wq
\ ((getcmdtype() == ':' && getcmdpos() <= 3) ? 'wq' : 'Wq')
+ cnoreabbrev <expr> Wqa
+ \ ((getcmdtype() == ':' && getcmdpos() <= 4) ? 'wqa' : 'Wqa')
endif
" Also fix my typo with "Q".
if v:version < 700
cnoreabbrev Q q
+ cnoreabbrev Qa qa
else
cnoreabbrev <expr> Q
\ ((getcmdtype() == ':' && getcmdpos() <= 2) ? 'q' : 'Q')
+ cnoreabbrev <expr> Qa
+ \ ((getcmdtype() == ':' && getcmdpos() <= 3) ? 'qa' : 'Qa')
endif
" Make sure xa0 (alt + space) is automatically changed to a normal whitespace