Vim is my preferred text editor when I program, and thus I always run into a particularly annoying issue.
Frequently, when I quickly need to save the buffer and continue on to some other miscellaneous task, I do the typical
:w
However, I always?— what seems to be like more than 50% of the time?— manage to capitalize that?:w
. Naturally, Vim yells at me because W
is an invalid command:
E492: Not an editor command: W
My question is how can one alias colon-commands in Vim. Particularly, could you exemplify how to alias W
to w
.
I am aware of the process to map keys to certain commands, but that is not what I’m looking for.
See Question&Answers more detail:os