Settings for Compare Two Front Documents

274 views
Skip to first unread message

Gribnif

unread,
Feb 28, 2012, 1:54:20 PM2/28/12
to bbe...@googlegroups.com
I frequently use Compare Two Front Documents, rather than Find Differences, because the latter requires that you choose the documents to compare (and I often have over a hundred open at once!)

The problem with CTFD is that there is no way to change the Ignore Spaces settings, like there is for FD. Yes, I know that if I go into FD and change things the way I want them and hit the Compare button, those settings will stick for CTFD, but that is very inconvenient. It also seems to me that this is confusing from a UI perspective, since the settings used by CTFD are not associated with its menu entry.

Does anyone know of a way around this? I've tried various modifier key combinations, and can't get CTFD to show the settings dialog.

Christopher Stone

unread,
Feb 28, 2012, 6:41:27 PM2/28/12
to bbe...@googlegroups.com
On Feb 28, 2012, at 12:54, Gribnif wrote:
I frequently use Compare Two Front Documents, rather than Find Differences, because the latter requires that you choose the documents to compare (and I often have over a hundred open at once!)

The problem with CTFD is that there is no way to change the Ignore Spaces settings, like there is for FD. Yes, I know that if I go into FD and change things the way I want them and hit the Compare button, those settings will stick for CTFD, but that is very inconvenient. It also seems to me that this is confusing from a UI perspective, since the settings used by CTFD are not associated with its menu entry.
______________________________________________________________________

Hey There,

I think I agree with you on this one.

Unlike in the 'sort lines' command vs the 'sort lines' dialog you cannot open the 'find differences' dialog, change settings, dismiss the dialog, and have those new settings work for 'compare front two documents'.

Does anyone know of a way around this? I've tried various modifier key combinations, and can't get CTFD to show the settings dialog.

This is what the manual says:

"Performs a Find Differences on the two frontmost text documents, using the same settings currently active for the Find Differences command."

I think you should contact support with a feature request.  Bare Bones Software <sup...@barebones.com>

In the meantime you can script it to your liking:

try
tell application "BBEdit"
compare window 1 against window 2 options ¬
{case sensitive:true, ignore curly quotes:true, ignore extra spaces:true, ignore leading spaces:true, ignore trailing spaces:true}
end tell
on error eMsg number eNum
set {c, s} to {return, "------------------------------------------"}
set e to s & c & "Error: " & eMsg & c & s & c & "Error Number: " & eNum & c & s
beep
display dialog e
end try

If you want more flexibility you can do something like this:

set compOpts to {"All Options: false", "case sensitive:true", "ignore curly quotes:true", "ignore extra spaces:true", "ignore leading spaces:true", "ignore trailing spaces:true"}

tell application "BBEdit"


tell me to set compOpts to choose from list compOpts ¬
with title "Compare Front Two Documents" with prompt ¬
"Select Options" default items (items 2 thru -1 of compOpts) ¬
multiple selections allowed true ¬
with empty selection allowed


end tell

Note that this script only demonstrates using choose-from for options and doesn't flesh-out the logics of actually using the items returned.

--
Best Regards,
Chris

BBunny

unread,
May 29, 2013, 3:16:33 PM5/29/13
to bbe...@googlegroups.com, listm...@thestoneforge.com
Chris, thank you for that script; this has been driving me nuts. Is there any way to set additional "ignore" parameters, such as "ignore comments" or ignore some other text that I specify?

blinde

unread,
Nov 22, 2013, 11:19:57 AM11/22/13
to bbe...@googlegroups.com, listm...@thestoneforge.com
christopher -

you are such a stud... the assistance you've provided me in this group and privately has been invaluable. i know i can look forward to learning something from your posts, and seek them out.

let me know if you get tired of appreciation and thanks... in the meantime, thank you again for your continued awesomeness.

bruce







On Tuesday, February 28, 2012 3:41:27 PM UTC-8, Christopher Stone wrote:
Reply all
Reply to author
Forward
0 new messages