You are here: PSPad forum > English discussion forum > Text diff usage
Posted by: Andreas | Date: 2015-04-02 13:39 | IP: IP Logged
Making it optional is great. Sometimes I like the quick diff overview within PSPad.
Posted by: pspad | Date: 2015-04-02 13:57 | IP: IP Logged
Yes. It's optional with one checkbox what will tell if internal or external tooll will be used. Rest of the settings will stay, so you can easily switch external or internal diff
Posted by: MadCompie | Date: 2015-04-16 17:04 | IP: IP Logged
My apologies toralf, of coarse I don't mind!
Here you go :
copy the following code snippet into some file "diffmerge.vbs" into the PSP subfolder "script\VBScript" :
Const module_name = "DiffMerge"
Const module_ver = "1.00"
newFilename = ""
oldFilename = ""
Sub setNewFile
If (editorsCount = 0) Then
Exit Sub
End If
logClear()
Set editor = newEditor()
editor.assignActiveEditor
newFilename = editor.fileName
logAddLine("Diff choose NEW filename:" & newFilename)
End Sub
Sub setOldFile
If (editorsCount = 0) Then
Exit Sub
End If
Set editor = newEditor()
editor.assignActiveEditor
oldFilename = editor.fileName
logAddLine("Diff choose OLD filename:" & oldFilename)
End Sub
Sub doCompare
If (editorsCount = 0) Then
Exit Sub
End If
'execute DiffMerge (64-bit)
Set SH = Wscript.CreateObject("WScript.Shell")
pspadDirectory = FileSystem.getPSPadDir()
logAddLine("")
logAddLine("Comparing ")
logAddLine("(NEW) " & newFilename)
logAddLine("(OLD) " & oldFilename)
SH.Run """" & "C:\Program Files\DiffMerge\sgdm.exe" & """ """ & newFilename & """ """ & oldFilename &"""",1,1
'always select the 2nd file after comparison...
Set editor = newEditor()
editor.assignEditorByName(oldFilename)
editor.activate
End Sub
Sub EditMe
Set editor = newEditor()
editor.openFile(moduleFileName(module_name))
End Sub
' ------------------------------------------------------------------------------
' Default module subroutines.
' ------------------------------------------------------------------------------
' "Init" is required
' It is called automatically during initialization to create menu items.
Sub Init
menuName = "&" & module_name
addMenuItem "Diff choose NEW",menuName, "setNewFile", "Alt+F1"
addMenuItem "Diff choose OLD",menuName, "setOldFile", "Alt+F2"
addMenuItem "Diff NEW<->OLD",menuName, "doCompare", "Ctrl+Alt+c"
addMenuItem "-", menuName, "", "" 'Menu divider
addMenuItem "Edit " & module_name & "!", menuName, "EditMe"
End Sub
Then restart PSP : in the scripts menu there should be a new entry called "DiffMerge"...
Now to compare any two files :
So don't matter how many files are open, I always compare new file(on the left) to the old file (on the right) : because changes are done in DiffMerge from left to right.
Hope this is helpful?
Posted by: mgutt | Date: 2015-04-24 10:36 | IP: IP Logged
@MadCompie
Why do you think is diffmerge better then Meld? I viewed some videos and diffmerge seems not to be as intuitive because you need to use the buttons in top navigation bar. In Meld you have the buttons on the side of every differing line and you are able to choose in which direction you want to apply something. To jump to the next diff you only need to place the mouse cursor in the middle and use the scroll wheel.
Posted by: Andreas | Date: 2015-04-24 14:31 | IP: IP Logged
mgutt:@MadCompie
Why do you think is diffmerge better then Meld?
There seam to be more good diff tools www.ghacks.net
MadCompie mentioned some reasons why he prefers winmerge.
Above that meld isn't easy to install on windows. Some functions seen on videos do not work on my windows, the videos show it on linux. E.g. I'm not able to choose the second directory for folder comparison.
Posted by: MadCompie | Date: 2015-04-25 19:37 | IP: IP Logged
Videos? you should try it out
Nobody says you have to use the buttons? Personnaly I always use the keyboard (shortcuts), much faster!
Changes always occur from left to right.
Don't use the mouse: next diff thru keyboard shortcut.
Also find previous.
And last but not least : can you do the following in Meld?
"prepend" & "append" instead of "replace" ...
example in my case
<f7> next change
<shift+f7> previous change
right mouse : popup with : replace, append, prepend,...
Posted by: mgutt | Date: 2017-02-26 22:34 | IP: IP Logged
A little feedback: I tried meld, winmerge and diffmerge and finally I found Beyond Compare and I think this is the best of all. But it costs 60 dollar to activate all the features.
Posted by: Andreas | Date: 2017-02-27 03:58 | IP: IP Logged
This week I tried an unoffical winmerge build winmerge.org (other versions). This one "WinMerge 2.14.0 + 3-way merge, image compare/merge" was the best for me. I use the WinMerge-2.14.0-jp-128-x64-Setup.exe.zip. It is much better than the old winmerge.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR