Re: Any way to search previous searches?

2018-08-24 Thread F. Alfredo Rego
Hey Chris,

Cool. I’ll dive into it during the weekend.

Thanks!

Alfredo



> On Aug 24, 2018, at 12:54 PM, Christopher Stone  
> wrote:
> 
> On 08/20/2018, at 15:15, F. Alfredo Rego  > wrote:
>> Rich will probably give me some grief but here is what I did, in case my 
>> fellow BBEdit users might find this useful.
> 
> 
> Hey Alfredo,
> 
> Here's a live working solution.
> 
> It's a bit quick and dirty, so the formatting isn't as precise as I'd like – 
> but I don't have time to do better right now.
> 
> I've provided the source and a compiled AppleScript which can be opened and 
> run with the Script Editor.app (or Script Debugger  
> -- SD-Lite is now free).
> 
> Install here:
> 
> ~/Library/Application Support/BBEdit/Scripts/
> 
> Give it a keyboard shortcut and go-to-town.
> 
> --
> Best Regards,
> Chris
> 
> 
> # Auth: Christopher Stone
> # dCre: 2018/08/24 13:36
> # dMod: 2018/08/24 13:48
> # Appl: BBEdit, AppleScript & Perl
> # Task: Extract Recent Find Strings from BBEdit Preferences.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @Save, @Perl, @Extract, @Recent, @Find, 
> @Strings, @Prefs, @Preferences
> 
> 
> set scriptSrc to text 2 thru -1 of "
> #!/usr/bin/env perl -0777 -nsw
> use v5.010;
> 
> $_ = `
> plutil -convert xml1 ~/Library/Preferences/com.barebones.bbedit.plist -o 
> - 
> `;
> 
> /FindDialog_SearchReplaceHistory.+FindDialog_SelectedSourceNodes<\\/key>/ms;
> 
> $_ = $&;
> 
> s!^\\h*(FindDialog_SearchReplaceHistory|FindDialog_SelectedSourceNodes)\\R?!!gm;
> s!^\\h*\\R?!!gm;
> s!^\\t\\t!!gm;
> s!^\\h*(CaseSensitive|EntireWord|GrepEnabled|SearchDate|WrapAround)\\R?!!gm;
> s!^\\h*<(true|false)/>\\R?!!gm;
> s!\\R?!!gm;
> s!\\R*\\Z!!gm;
> s!SearchString\\R?!Find:!gm;
> s!ReplaceString\\R?!Replace:!gm;
> s!!“!gm;
> s!!”!gm;
> s!!!gm;
> s!^\\h+!!gm;
> s!^\\h*Replace:!Repl:!gm;
> s!^(\\d+.+)Z!$1:!gm;
> 
> my @array = split(/\\n+<\\/dict>\\n+/, $_);
> 
> $, = \"\\n\";
> 
> my $temp;
> my @temp;
> 
> foreach ( @array ) {
> @temp = split(\"\\n\", $_);
> @temp = sort @temp;
>   $temp = join \" \", @temp;
>   $_ = $temp;
> }
> 
> $_ = join \"\\n\", @array;
> 
> s!\\h*(Repl:)!\\t\\t\\t$1!gm;
> 
> print;
> "
> 
> set dataStr to do shell script "
> perl -f <<< " & quoted form of scriptSrc
> 
> 
> 
> tell application "BBEdit"
> activate
> set newDoc to make new document with properties {text:dataStr, bounds:{0, 
> 44, 1920, 1200}}
> tell newDoc
> select insertion point before its text
> translate html to text with entity conversion without create new 
> document
> end tell
> end tell
> 
> 
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter:  >
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to bbedit@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit 
> .
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter:  >
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to bbedit@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit 
> .

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send 

Re: Any way to search previous searches?

2018-08-24 Thread Christopher Stone
On 08/20/2018, at 15:15, F. Alfredo Rego  wrote:Rich will probably give me some grief but here is what I did, in case my fellow BBEdit users might find this useful.Hey Alfredo,Here's a live working solution.It's a bit quick and dirty, so the formatting isn't as precise as I'd like – but I don't have time to do better right now.I've provided the source and a compiled AppleScript which can be opened and run with the Script Editor.app (or Script Debugger -- SD-Lite is now free).Install here:~/Library/Application Support/BBEdit/Scripts/Give it a keyboard shortcut and go-to-town.--Best Regards,Chris# Auth: Christopher Stone# dCre: 2018/08/24 13:36# dMod: 2018/08/24 13:48# Appl: BBEdit, AppleScript & Perl# Task: Extract Recent Find Strings from BBEdit Preferences.# Libs: None# Osax: None# Tags: @Applescript, @Script, @Save, @Perl, @Extract, @Recent, @Find, @Strings, @Prefs, @Preferencesset scriptSrc to text 2 thru -1 of "#!/usr/bin/env perl -0777 -nswuse v5.010;$_ = `    plutil -convert xml1 ~/Library/Preferences/com.barebones.bbedit.plist -o - `;/FindDialog_SearchReplaceHistory.+FindDialog_SelectedSourceNodes<\\/key>/ms;$_ = $&;s!^\\h*(FindDialog_SearchReplaceHistory|FindDialog_SelectedSourceNodes)\\R?!!gm;s!^\\h*\\R?!!gm;s!^\\t\\t!!gm;s!^\\h*(CaseSensitive|EntireWord|GrepEnabled|SearchDate|WrapAround)\\R?!!gm;s!^\\h*<(true|false)/>\\R?!!gm;s!\\R?!!gm;s!\\R*\\Z!!gm;s!SearchString\\R?!Find:!gm;s!ReplaceString\\R?!Replace:!gm;s!!“!gm;s!!”!gm;s!!!gm;s!^\\h+!!gm;s!^\\h*Replace:!Repl:!gm;s!^(\\d+.+)Z!$1:!gm;my @array = split(/\\n+<\\/dict>\\n+/, $_);$, = \"\\n\";my $temp;my @temp;foreach ( @array ) {    @temp = split(\"\\n\", $_);    @temp = sort @temp; 	$temp = join \" \", @temp; 	$_ = $temp;}$_ = join \"\\n\", @array;s!\\h*(Repl:)!\\t\\t\\t$1!gm;print;"set dataStr to do shell script "perl -f <<< " & quoted form of scriptSrctell application "BBEdit"    activate    set newDoc to make new document with properties {text:dataStr, bounds:{0, 44, 1920, 1200}}    tell newDoc        select insertion point before its text        translate html to text with entity conversion without create new document    end tellend tell



-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
<>




-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Add all open files to a project?

2018-08-24 Thread Barbara Snyder
Thanks to everyone for all the suggestions. I will definitely try them out as 
time allows.

-- Barbara


> On Aug 24, 2018, at 11:00 AM, Christopher Stone  > wrote:
> 
> On 08/23/2018, at 09:45, Christopher Stone  > wrote:
>> On 08/22/2018, at 18:06, Barbara Snyder > > wrote:
>>> I have a bunch of open files. I'd like to create a project that includes 
>>> all open files (without me having to add them individually). Is there a way 
>>> to do this? Or do I have to enter a feature request?
>> 
>> Save this Bash script to a file here:
> 
> 
> Hey Barbara,
> 
> Here's an AppleScript alternative to the shell script I posted.
> 
> Save as a compiled script using the Apple Script Editor.app to:
> 
> ~/Library/Application Support/BBEdit/Scripts/
> 
> Similarly to the Bash script you can assign it a keyboard shortcut or just 
> run it from the script menu.
> 
> --
> Best Regards,
> Chris
> 
> 
> # Auth: Christopher Stone
> # dCre: 2018/08/24 12:35
> # dMod: 2018/08/24 12:35 
> # Appl: BBEdit
> # Task: Create Synthic Project from Open Text Documents.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @BBEdit, @Create, @Synthic, @Project, @Open, 
> @Text, @Documents
> 
> 
> tell application "BBEdit"
> set fileList to file of text windows whose on disk is true
> set winList to text windows whose on disk is true
> end tell
> 
> repeat with i in fileList
> set contents of i to quoted form of (POSIX path of (contents of i))
> end repeat
> 
> set AppleScript's text item delimiters to " "
> set fileList to fileList as text
> 
> set shCMD to "
> export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH;
> bbedit --project " & fileList & "&> /dev/null &"
> do shell script shCMD without altering line endings
> 
> set closeOldWindows to true -- set to false if you don't want to close the 
> old windows.
> 
> if closeOldWindows then
> 
> tell application "BBEdit"
> repeat with theWin in winList
> close theWin
> end repeat
> end tell
> 
> end if
> 
> 
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com " rather than posting to 
> the group.
> Follow @bbedit on Twitter:  >
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "BBEdit Talk" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/bbedit/WZPkpq7BlsE/unsubscribe 
> .
> To unsubscribe from this group and all its topics, send an email to 
> bbedit+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to bbedit@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit 
> .

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Add all open files to a project?

2018-08-24 Thread Christopher Stone
On 08/23/2018, at 09:45, Christopher Stone mailto:listmeis...@suddenlink.net>> wrote:
> On 08/22/2018, at 18:06, Barbara Snyder  > wrote:
>> I have a bunch of open files. I'd like to create a project that includes all 
>> open files (without me having to add them individually). Is there a way to 
>> do this? Or do I have to enter a feature request?
> 
> Save this Bash script to a file here:


Hey Barbara,

Here's an AppleScript alternative to the shell script I posted.

Save as a compiled script using the Apple Script Editor.app to:

~/Library/Application Support/BBEdit/Scripts/

Similarly to the Bash script you can assign it a keyboard shortcut or just run 
it from the script menu.

--
Best Regards,
Chris


# Auth: Christopher Stone
# dCre: 2018/08/24 12:35
# dMod: 2018/08/24 12:35 
# Appl: BBEdit
# Task: Create Synthic Project from Open Text Documents.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Create, @Synthic, @Project, @Open, 
@Text, @Documents


tell application "BBEdit"
set fileList to file of text windows whose on disk is true
set winList to text windows whose on disk is true
end tell

repeat with i in fileList
set contents of i to quoted form of (POSIX path of (contents of i))
end repeat

set AppleScript's text item delimiters to " "
set fileList to fileList as text

set shCMD to "
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH;
bbedit --project " & fileList & "&> /dev/null &"
do shell script shCMD without altering line endings

set closeOldWindows to true -- set to false if you don't want to close the old 
windows.

if closeOldWindows then

tell application "BBEdit"
repeat with theWin in winList
close theWin
end repeat
end tell

end if



-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Export list of menu shortcuts in plain text?

2018-08-24 Thread Patrick Woolsey

On 8/24/18 at 1:06 PM, barb...@signalfx.com (Barbara Snyder) wrote:

Ha, well first of all, I was looking at 
/Users/barbara/Library/Application Support/BBEdit/Setup/Menu 
Shortcuts.plist  instead of what I just learned I should be 
looking at: /Users/barbara/Library/Preferences/com.barebones.bbedit.plist


Correct? I should be looking at the latter?



I'm sorry; I misunderstood and thought you were talking about 
*TextExpander's* prefs rather than BBEdit's, so please disregard 
my prior post.


Since BBEdit does not store key shortcuts in human-readable 
form, I regret there is no way to directly compare them.


I do however suggest you review what key shortcut(s) 
TextExpander is configured to use, as that may help you recall 
what prior customization(s) you made in BBEdit.



Regards,

 Patrick Woolsey
==
Bare Bones Software, Inc. 

--
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email

"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Export list of menu shortcuts in plain text?

2018-08-24 Thread Barbara Snyder
Ha, well first of all, I was looking at /Users/barbara/Library/Application 
Support/BBEdit/Setup/Menu Shortcuts.plist  instead of what I just learned I 
should be looking at: 
/Users/barbara/Library/Preferences/com.barebones.bbedit.plist

Correct? I should be looking at the latter?

And  I am comparing them but don't see anything resembling a list of 
shortcut keys. The only differences are in recent files etc, or stuff like 
this (one string has VAM and another has WAM):


BookmarkData

Ym9va2QEAAQQMAAA
VAMAAAUA

Also, the broken one is missing the last line below.


Wlst
FNMW

Stuff like that.

So if there is someplace else I should be looking, please advise!

Thanks -- Barbara


On Friday, August 24, 2018 at 9:39:23 AM UTC-7, Patrick Woolsey wrote:
>
> On 8/24/18 at 10:36 AM, bar...@signalfx.com  (Barbara 
> Snyder) wrote: 
>
> >I did something to one of my menu shortcuts that caused 
> >TextExpander to stop working, but have no idea what. I restored 
> >the defaults to fix it, and kept a copy of the old plist. I'd 
> >like to compare the old and new settings to see what the 
> >differences are and pinpoint the problem. 
>
> No exporting required; you need only open the old and new .plist 
> files in BBEdit and then compare them with the Search -> Find 
> Differences command. :-) 
>
>
> Regards, 
>
>
>
>   Patrick Woolsey 
>
> == 
> Bare Bones Software, Inc.  
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Export list of menu shortcuts in plain text?

2018-08-24 Thread Patrick Woolsey

On 8/24/18 at 10:36 AM, barb...@signalfx.com (Barbara Snyder) wrote:

I did something to one of my menu shortcuts that caused 
TextExpander to stop working, but have no idea what. I restored 
the defaults to fix it, and kept a copy of the old plist. I'd 
like to compare the old and new settings to see what the 
differences are and pinpoint the problem.


No exporting required; you need only open the old and new .plist 
files in BBEdit and then compare them with the Search -> Find 
Differences command. :-)



Regards,



 Patrick Woolsey

==
Bare Bones Software, Inc. 

--
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email

"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Export list of menu shortcuts in plain text?

2018-08-24 Thread Barbara Snyder
I did something to one of my menu shortcuts that caused TextExpander to 
stop working, but have no idea what. I restored the defaults to fix it, and 
kept a copy of the old plist. I'd like to compare the old and new settings 
to see what the differences are and pinpoint the problem. 

Is there a way to export the preferences to a plain text format? I know I 
can use Xcode or buy a plist editor, but if there's a way to avoid that, 
I'd like to. I'm on High Sierra.

Thanks -- Barbara

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: BBEdit hide menu bug?

2018-08-24 Thread Michele Baravalle
Hello,
thanks for your response.

I had read the pinned post but I had not seen the report. 
I'm so sorry.

Regards

Il giorno giovedì 23 agosto 2018 19:24:52 UTC+2, Rich Siegel ha scritto:
>
> On 8/23/18 at 11:05 AM, ooly...@gmail.com  (Michele 
> Baravalle) wrote: 
>
> >It's not a problem to remove sub-menus (like "Cut Columns", 
> >"Copy Columns", etc.) but if i remove the check from Columns, 
> >the menu don't disappear. 
>
> In fact this was fixed recently, in the build that was posted to 
> the list yesterday. <
> https://groups.google.com/d/msg/bbedit/hASCZhwmvJI/KG9vSLeXDwAJ> 
>
> [As a general note, I encourage anyone posting to the list for 
> the first time to take a few minutes and read the pinned posts, 
> as well as the posts from the previous few days, before posting. 
> Sometimes what you are about to ask has been answered. :-)] 
>
> R. 
> -- 
> Rich Siegel Bare Bones Software, Inc. 
> >  <
> http://www.barebones.com/> 
>
> Someday I'll look back on all this and laugh... until they 
> sedate me. 
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.