[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: <bd_at_bc-bd.org>
Date: Tue, 30 Sep 2008 13:12:37 +0000

> 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.
>
> Stefan
> [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.

Yes I tried a batch file and that does not work. That is exactly why I asked on
the list.

Settings:
C:\Documents and Settings\stefanv\My Documents\diff.bat "%base" "%mine"

This is diff.bat:

"C:\Program Files\Vim\vim71\diff.exe" -u "%1" "%2" > C:\Temp\diff.txt
"C:\Program Files\Vim\vim71\gvim.exe" C:\Temp\diff.txt

What happens is that a (I guess command.exe) window opens for a split second,
closes again and nothing.

I changed the diff.bat to simply contain pause, same result.

        Stefan

-- 
BOFH excuse #242:
Software uses US measurements, but the OS is in metric...
---------------------------------------------------------------------
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 15:12:34 CEST

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