Originally Posted by viki.ahmad
map ! :wq! <CR>
thanx druuna it works but what was wrong with mine? with mine when i ':write', it saves any changes made but doesn't exit from editor.
w is short for write, so your command is redundant. The reason why it only writes in your case is that write is executed, the wq! (force write and quit) waits for a return. The <CR>
takes care of the return.