[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Viewing diffs in unified format in vim

From: Tim Schultze <tschultze_at_nuthatchsoftware.com>
Date: Tue, 30 Sep 2008 08:48:06 -0400

-----Original Message-----
From: bd_at_bc-bd.org [mailto:bd_at_bc-bd.org]
Sent: Tuesday, September 30, 2008 8:28 AM
To: users_at_tortoisesvn.tigris.org
Subject: Re: Viewing diffs in unified format in vim

On Tue, Sep 30, 2008 at 08:00:43AM -0400, Tim Schultze wrote:
> On my system, I put the following in my External Diff line:
> C:\Program Files\Vim\Vim71\gvim.exe -d -g %base %mine
> And it appears to work fine (at least in simple cases). What do you
> mean by "unified format?"

Well a diff in unified diff format:

        - http://en.wikipedia.org/wiki/Unified_diff#Unified_format
        - man diff, search for -u

I am attaching 3 files, foo, bar and a diff between those two:

 # diff -u foo bar > diff

If you run svn diff you will get a unified diff.

[Tim Schultze]
So you want to run the command line version of diff, right? The GUI version
of vim doesn't support unified diff, IIRC.

I can't remember if you said you tried a batch file or not but it seems that
a batch/command file is your most straightforward answer. Pass the two
parameters (in quotes) on the command line to the batch file, run the
command line diff -u on those two parameters piping to a temporary file,
then fire up vim to view the temporary file, and (perhaps) after that,
delete the temporary file.


You never have to change anything you got up in the middle of the night to
		-- Saul Bellow
To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-09-30 14:48:58 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.