Diff in PhpStorm

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Diff in PhpStorm



How can I compare a document in current project with one that is not a part of project?
How can I compare two arbitrary files in my computer with phpStorm?





You could copy the content from the external file into clipboard and right click on/in your project file and then click Compare with clipboard.
– Dan Lee
Sep 11 '12 at 10:41



Compare with clipboard





@Dan Lee Yes, as you mentioned currently easiest way that I found for comparing a project file with a non-project file is copy external file to clipboard and select "View->Compare with clipboard".
– PHPst
Sep 11 '12 at 10:55





4 Answers
4



Currently, the easiest way that I found for comparing a project file with a non-project file is coping the external file to clipboard and clicking on "View->Compare with clipboard".





For me this feature is broken in version phpstorm 10. Someone experiencing the same?
– velop
Nov 9 '15 at 14:47



It can be done only externally:



You can also open the difference viewer without running PhpStorm. This is done through the following command:


<path to PhpStorm executable file> diff <path_1> <path_2>



where path_1 and path_2 are paths to the files in question, which can be of various types, including jar.


path_1


path_2



From inside PhpStorm you can only compare files that are available in the project.



What I do for comparing two external sources (web page sources etc.)



1 - Open a new scratch file from "File" Menu -> "New Scratch File" and choose a file type



2 - Copy & Paste Source 1 to this new scratch file



3 - Either create a new scratch file for second source and click "Compare With" from "View" Menu
or
better just directly copy second to clipboard and from "View" Menu click to "Compare with Clipboard"



In phpStorm 2016.2 (and possibly some earlier editions) you can navigate to the external file via File >> Open... , which will open a tab showing the external file's content. You can then use View>> Compare with... to compare the external file to a file within your project.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard