vimmerge - 2-way or 3-way merges with vim

This is a little hack I wrote for doing merges with vim. It has five modes:

  1. 2-way merge, this is the same as vimdiff
  2. 2-way merge with output to a new file
  3. 3-way merge with output to "mine"
  4. 3-way merge with output to a new file
  5. 2-way merge with all input coming from one file, which uses markup similar to the output of RCS merge. In this case, only a single input file is given on the cmdline.

By default it assumes the same file ordering as diff3, but unlike diff3 it will save the results in "mine" by default:

vimmerge mine older yours

To write to a new file, use -w:

vimmerge -w merged mine older yours

To completely change the order of the incoming parameters, either specify them explicitly or use --order:

vimmerge -o older -y yours -m mine -w merged
vimmerge --order oymw older yours mine merged

etc-update

Here's a snippet for your etc-update.conf to use vimmerge:

merge_command="vimmerge --mine %new --yours %orig --write %merged"

dispatch-conf

Here's a snippet for your dispatch-conf.conf to use vimmerge:

merge="vimmerge --write=%s --mine=%s --yours=%s"

Downloads

Filename Date Size MD5
vimmerge-1959 02-Oct-2006 10:24 5.3K 37493977ba63008d6a274db55803f811

This page was generated Tue Jan 29 07:57:06 2008.