From: Simon Ruderich Date: Fri, 8 May 2009 13:00:53 +0000 (+0200) Subject: vimrc: Add auto corrections for :Qa and :Wqa. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=9ff12b2034a81bdd04086db19bef7087abb29022;p=config%2Fdotfiles.git vimrc: Add auto corrections for :Qa and :Wqa. --- diff --git a/vimrc b/vimrc index bea600b..22229e8 100644 --- a/vimrc +++ b/vimrc @@ -124,18 +124,24 @@ nnoremap ; :call setline(line('.'), getline('.') . ';') if v:version < 700 cnoreabbrev W w cnoreabbrev Wq wq + cnoreabbrev Wqa wqa else cnoreabbrev W \ ((getcmdtype() == ':' && getcmdpos() <= 2) ? 'w' : 'W') cnoreabbrev Wq \ ((getcmdtype() == ':' && getcmdpos() <= 3) ? 'wq' : 'Wq') + cnoreabbrev 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 Q \ ((getcmdtype() == ':' && getcmdpos() <= 2) ? 'q' : 'Q') + cnoreabbrev Qa + \ ((getcmdtype() == ':' && getcmdpos() <= 3) ? 'qa' : 'Qa') endif " Make sure xa0 (alt + space) is automatically changed to a normal whitespace