How to force write (`:w!`) and quit (`:q`) vim in the same command?
How can I force write (:w!
) and quit (:q
) vim in the same command? I try :w!q
but that doesn’t work.
The vim
idiom is :wq!
. Another read of man vim
is indicated.
As mentioned in other answer you can use command like:
:wq!
But you can simplify the command by enter:
:x!
(x=wq
in this case)
Maybe you can consider reading this answer in StackOverflow.