Last Updated: February 25, 2016
·
1.31K
· cmdel

Fixing shift typing mistakes in ViM

For a long time I've been plagued with the onerous :W in ViM. By Shift-key laziness, when issuing commands to ViM the shift key would "stick" just enough msecs in order to capitalise W and make it unusable to write changes to the file.
Add the following to your .vimrc file and never have to worry about the SHIFT key again.

cmap W w
cmap wQ wq
cmap WQ wq
cmap Q q

If you combine the above with this:

nnoremap ; :

then you don't even need the SHIFT key for ViM commands any more.

Enjoy