Vim allows you to add key mappings for commands in all modes, including command line mode, so you can define these mappings (in your .vimrc ):
:cnoreabbrev wq w<bar>bd :cnoreabbrev q bd
Commands tell Vim that pressing w q on the command line should be expanded to w|bd and, similarly, q to bd . See :help key-mapping details.
ib.
source share