Git and vimdiff - close all files at once

When using vimdiff with git and many modified files, vimdiff will open each file in sequence. It will open the next file after closing the current file.

But what if I just want to break out of the entire fault process, and also do not want different discoveries to open?

How can I stop all the differences when using vimdiff?

+4
source share
2 answers

OK, I found it.

in.gitconfig:

[difftool]
    # Be able to abort all diffs with `:cq` or `:cquit`
    trustExitCode = true

Then inside vim just type :cqor :cquit. This will exit vim with error codes, and git will rely on error codes with trustExitCode.

+8
source

How can I stop all the differences when using vimdiff?

, .gitconfig. vim:

:qa ( )
:wqa ,

, ! :

:qa! ( - )
:wqa! force quit all ( )

vim :help :qa

+2

Source: https://habr.com/ru/post/1618382/


All Articles