I know that the diffs in vim are local to page, this means we can only have one diff in one tab page, right? But what if I want to have two diffs in one tab page. Eg, one diff is between the top two windows, and the other diff is between the bottom two windows. This is a commn sinerio in dealing with git merge confilict.
We can have the remote commit changes diff in top two windows and the local file and local confilict file diff in bottom two windows, then, we konw exactly what have been changed in the remote caused the confilct and manuuly fix them up.

2 Answers
2

Participation of a buffer in a diff is determined by the 'diff' buffer setting for all buffers visible within a tab page (for up to four buffers). Implementing what you desire would need a notion of "diff groups", e.g. :setlocal diff=group1, but something like this does not exist today.

The only way to achieve this today without a patch to Vim (that I can think of) is running two separate Vim instances in a split-window screen or tmux session.