It may not be entirely your way, but here's how I use GVim for the merge tool.
I set it for a two-way merge: it has a “source” on the left (where I go), and a merge file on the right (it starts with the information for my destination branch).
I installed it like this:
command: C:\Program Files (x86)\Vim\vim73\gvim.exe argument: -c "vert diffsplit %1 " %4 -c "wincmd l|0read %2 |diff"
What does it do:
- Reads in the source file on the left and splits the window (-c "vert diffsplit% 1")
- Opens the merge result on the right side (% 4)
- Runs a quick script that:
- Moving in the right window (wincmd l)
- Reads my existing changes in a branch (0read% 2)
- Re-runs the diff (diff) algorithm
This allows me to “distinguish” my work from an incoming merge, and keeping the right side will allow the merge.
Eddie parker
source share