How to disable a built-in command in vim
A better solution can be:
:cabbrev wq w
But I'm not sure why cmap
doesn't work as excepted.
Actually I had mapped one my function keys to save files:
:map <F2> :w<CR>
:nmap <F2> <ESC>:w<CR>i
UPDATE: typo corrected in the first command.
UPDATE2: possible workaround:
:cabbrev wq<CR> w
HTH