Differences between revisions 1 and 2
Revision 1 as of 2008-03-23 16:24:38
Size: 553
Editor: abuehl
Comment: moved from TipsAndTricks/Intermediate
Revision 2 as of 2009-05-19 19:31:00
Size: 553
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Using vimdiff to view single diffs

    hg cat <filename> | vim - -c  ":vert diffsplit <filename>" -c "map q :qa!<CR>";

Using bash to save as a command:

hgdiff() {
    hg cat $1 | vim - -c  ":vert diffsplit $1" -c "map q :qa!<CR>";
}

Then just use hgdiff <filename> to invoke, and q from within vim to quit.

ErikTerpstra added:

If you want the new version on the right side, try this instead:

hgdiff() {
    vimdiff -c 'map q :qa!<CR>' <(hg cat "$1") "$1";
}


CategoryTipsAndTricks

UsingVimdiffForSingleDiffs (last edited 2010-11-10 05:03:36 by ErnieRael)