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.
vim idiom is
:wq!. Another read of
man vim is indicated.
As mentioned in other answer you can use command like:
But you can simplify the command by enter:
x=wq in this case)
Maybe you can consider reading this answer in StackOverflow.