English 中文(简体)
Source code comparison app that doesn t require files? [closed]
原标题:

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

I m looking for an easy-to-use, free source code comparison app for Windows, which will highlight differences side-by-side between two pieces of source code. Some apps get close to what I want, but are too restrictive by requiring you load in entire files and compare them in their entirety. Sometimes I just want to compare a section of my file, such as a single function, which may be in totally different locations in the two versions I d be comparing, making it hard to find in both panes in large files. Basically, I d like to be able to simply edit/copy/paste the content in both panes rather than have the restriction of using files. That way I can copy and paste one function into one pane and another into the other, editing/re-ordering as necessary.

(Note that I realize there are other comparison app recommendation threads out there, but I m having a hard time finding a free app that isn t a strict file-to-file comparison app)

Thanks for any pointers or links, thanks!

问题回答

I do this in Vim all the time. Here s what I do:

  1. Run gvimdiff -O a b. This is Vim is GUI diff mode.
  2. Paste "before" into left pane of Vim.
  3. Paste "after" into right pane of Vim.
  4. :diffupdate (not always necessary)

You can also edit either side of the diff, which can be handy.

I imagine that any text editor that supports side-by-side diff and copy and paste should be able to do something similar.

And before you object that Vim is file-based (which is true), the above procedure doesn t require creating any actual files in the file-system.

Notepad++ has a nice diff function that will suit your needs also.

Winmerge can be used to do what you outlined (i.e., edit/copy/paste snippets into two windows and then make comparisons or mergers).





相关问题
Find the closest time from a list of times

So, here s the scenario. I have a file with a created time, and I want to choose a time from a list of times that that file s created time is closest or equal too...what would be the best way to ...

PHP Comparison Operators and Data Types

I m currently working through O Reilly s "Programming PHP" and have come across this table titled "Type of comparison performed by the comparison operators": First Operand | Second ...

Loop Until Condition Reached, iPhone

I have a problem here... After a button is pressed I want a loop to run until a condition is reached: - (IBAction)buttonclick1 ... if ((value2ForIf - valueForIf) >= 3) { ... I would like a loop ...

nuSoap or Zend Soap? [closed]

I would like to know the differences between nusoap and ZendSoap, which is the best? what benefits and disadvantages of each? Anyone who has used both technologies could make this comparison? Thank ...

Logic for a file compare

I trying to write a programm for file compare. For example: file1 1 2 3 4 5 file2 1 2 @ 3 4 5 If I do it line by line, I get: 1 == 1; 2 == 2; 3 != @; 4 != 3; 5 != 4; != 5; But, the truth is ...

热门标签