LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-04-2008, 08:13 PM   #1
kinasz
Member
 
Registered: Mar 2004
Location: Brisbane, Australia
Distribution: FreeBSD, Suse
Posts: 103

Rep: Reputation: 15
Is there anyway to take a standard diff and get a vimdiff output?


Is there anyway to take a standard diff file and get a vimdiff output?

Last edited by kinasz; 02-04-2008 at 08:30 PM.
 
Old 02-04-2008, 08:47 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
As far as I know 'vim -d fileOne fileTwo' is just presentation, like doing 'diff --sideby-side fileOne fileTwo|less', not a file format.
 
Old 02-04-2008, 08:54 PM   #3
kinasz
Member
 
Registered: Mar 2004
Location: Brisbane, Australia
Distribution: FreeBSD, Suse
Posts: 103

Original Poster
Rep: Reputation: 15
But if you do a diff of two files "diff file1.x file2.x > file3.diff" is there a way to view file3.diff "side-by-side", as in display it like you would see the results of a vimdiff?

In this example I only have file1.x and file3.diff. The .diff file was created remotely and I'm looking for a more pleasent way to view them.
 
Old 02-05-2008, 07:21 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Well the "file3.diff" is the result of "file1.x" and changes in "file2.x", so if you patch "file1.x" with "file3.diff" the result should be "file2.x", right?
 
Old 02-05-2008, 05:53 PM   #5
kinasz
Member
 
Registered: Mar 2004
Location: Brisbane, Australia
Distribution: FreeBSD, Suse
Posts: 103

Original Poster
Rep: Reputation: 15
ahh i see what your saying so I could get my vimmdiff by doing:

patch -s --output=/tmp/deleteme.x file1.x file3.diff && vimdiff file1.x /tmp/deleteme.x


Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I parse the output of a command that output to standard out? gauol Programming 9 01-17-2008 01:54 PM
what does "standard error was duplicated as standard output" mean? nickleus Linux - General 4 09-15-2006 06:14 AM
How can I use diff to difference between programs output? nadavvin Linux - General 4 08-05-2006 04:35 AM
how to restore standard output user_linux Linux - Newbie 2 06-17-2005 02:29 PM
redirectoring standard output phil123 Programming 6 02-25-2004 02:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration