How do you quit all windows with a single command in Vim or vimdiff?
:q only quits out of the active window, so then a separate :q is needed to close each window.
:qa quits all open windows/buffers/splits/tabs
(aliases: :qall :quitall)
For help on this command in Vim: :help :qa
:qa! will quit without giving an option to save if it's modified.
:wqa will write all changed buffers and then quit.
:wqa! will write all changed buffers, even readonly ones, and then quit.
:qa, first press ctrl+C.
:onlyto show the final result of the merge, thenZZto save and quit, since there is only one window open after:onlycommand (or swapZZfor however you like to quit a single window).