Re: TextWrangler feature - Reopen documents that were open at last quit

2016-10-18 Thread Christopher Stone
On Oct 17, 2016, at 15:29, Ron Feldman > wrote:
> I really like making my coworkers jealous with my infinite persistent 
> clipboards, and I don't want to lose that feeling of superiority.


Hey Ron,

How about being able to easily save those “clipboards”?

Make them more jealous.

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

~/Library/Application Support/BBEdit/Scripts/

Give the script a keyboard shortcut or activate it from the Script menu.

---
# Auth: Christopher Stone
# dCre: 2016/10/18 03:00
# dMod: 2016/10/18 03:32 
# Appl: BBEdit
# Task: Save unsaved text documents and shell documents to a date-stamped 
folder in the Finder.
# : Then close those documents and open the folder in the Finder.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Finder, @Save, @Unsaved, 
@Text_Documents, @Shell_Documents
---

set saveFolderWasCreated to false

tell application "BBEdit"
   
   set unsavedDocList to text documents whose on disk is false
   
   if length of unsavedDocList > 0 then
  
  set saveFolderPath to makeSaveFolder() of me
  set saveFolderWasCreated to true
  
  repeat with theDoc in unsavedDocList
 set docID to ID of theDoc
 save theDoc to (saveFolderPath & (name of theDoc)) & ".txt"
 close document id docID
  end repeat
  
   end if
   
   set unsavedShellDocList to every shell document whose on disk is false
   
   if length of unsavedShellDocList > 0 then
  
  if not saveFolderWasCreated then
 set saveFolderPath to makeSaveFolder()
 set saveFolderWasCreated to true
  end if
  
  repeat with theDoc in unsavedShellDocList
 set docID to ID of theDoc
 save theDoc to (saveFolderPath & (name of theDoc)) & ".worksheet"
 close document id docID
  end repeat
  
   end if
   
end tell

if saveFolderWasCreated then
   tell application "Finder"
  activate
  open (alias saveFolderPath)
   end tell
end if

---
--» HANDLERS
---
on makeSaveFolder()
   set newFolderName to do shell script "date \"+%Y-%m-%d %H.%M\""
   set newFolderName to "BBEdit → Untitled Docs → Saved " & newFolderName
   tell application "Finder"
  set newFolder to make new folder at (path to desktop folder) with 
properties {name:newFolderName}
  return newFolder as text
   end tell
end makeSaveFolder
---

Now then...  Let me know if you want to know how to open all the files in a 
single project window for perusal.

Of course looking through them in the Finder with Quick Look is easy enough.

--
Best Regards,
Chris

-- 
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: TextWrangler feature - Reopen documents that were open at last quit

2016-10-17 Thread Rich Siegel
On Monday, October 17, 2016, Ron Feldman  wrote:

> Sorry if this is answered elsewhere. I checked the comparison chart and 
> didn't see this explicitly called out as a BBEdit feature carried forward 
> from TextWrangler.

Every feature that is in TextWrangler is in BBEdit, without exception. :-)

Enjoy,

R.
-- 
Rich Siegel Bare Bones Software, Inc.
  

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.


Re: TextWrangler feature - Reopen documents that were open at last quit

2016-10-17 Thread Kyle DeMilo
You mean like this? If so, then BBEdit 11 has it :)

https://dl.dropboxusercontent.com/u/534805/prefs.png

On Mon, Oct 17, 2016 at 4:58 PM Ron Feldman 
wrote:

> Hi all,
>
> Sorry if this is answered elsewhere. I checked the comparison chart and
> didn't see this explicitly called out as a BBEdit feature carried forward
> from TextWrangler.
>
> In the Application preferences of the OSX version of TextWrangler, there
> is the option to "Reopen documents that were open at last quit" along with
> the sub-option to "Restore unsaved changes". This is version 5.5.2. What
> this does, magically, is allow me to have an infinite number of
> "clipboards" that are persistent through re-boots. TextWrangler is
> apparently saving all my open files, even if I don't save them. So I don't
> have to come up with names for items that are meaningless beyond a few
> days' work, and I don't have to find a place to store them. For example, I
> currently am up to "untitled text 113" - just tons of little clipboards
> that I can check back on and don't really need to clean up until I just
> feel like tossing the old clipboards, which I do every once in a while.
>
> Is this super special amazing feature also in BBEdit? I really like making
> my coworkers jealous with my infinite persistent clipboards, and I don't
> want to lose that feeling of superiority.
>
> Thanks,
>
> ..Ron
>
> --
> 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: TextWrangler feature - Reopen documents that were open at last quit

2016-10-17 Thread Lee Hinde

> On Oct 17, 2016, at 1:29 PM, Ron Feldman  wrote:
> 
> In the Application preferences of the OSX version of TextWrangler, there is 
> the option to "Reopen documents that were open at last quit" along with the 
> sub-option to "Restore unsaved changes". This is version 5.5.2. What this 
> does, magically, is allow me to have an infinite number of "clipboards" that 
> are persistent through re-boots. TextWrangler is apparently saving all my 
> open files, even if I don't save them. So I don't have to come up with names 
> for items that are meaningless beyond a few days' work, and I don't have to 
> find a place to store them. For example, I currently am up to "untitled text 
> 113" - just tons of little clipboards that I can check back on and don't 
> really need to clean up until I just feel like tossing the old clipboards, 
> which I do every once in a while.
> 
> Is this super special amazing feature also in BBEdit? I really like making my 
> coworkers jealous with my infinite persistent clipboards, and I don't want to 
> lose that feeling of superiority.

Yes.

-- 
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.