TextWrangler feature - Reopen documents that were open at last quit

600 views
Skip to first unread message

Ron Feldman

unread,
Oct 17, 2016, 4:58:28 PM10/17/16
to BBEdit Talk
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

Lee Hinde

unread,
Oct 17, 2016, 5:06:56 PM10/17/16
to bbe...@googlegroups.com

On Oct 17, 2016, at 1:29 PM, Ron Feldman <ronald....@linq3.com> 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.

Kyle DeMilo

unread,
Oct 17, 2016, 5:17:54 PM10/17/16
to BBEdit Talk
You mean like this? If so, thenĀ BBEdit 11 has it :)

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

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
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+un...@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Rich Siegel

unread,
Oct 17, 2016, 5:22:48 PM10/17/16
to bbe...@googlegroups.com
On Monday, October 17, 2016, Ron Feldman <ronald....@linq3.com> 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.
<sie...@barebones.com> <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they sedate me.

Christopher Stone

unread,
Oct 18, 2016, 4:49:04 AM10/18/16
to BBEdit-Talk
On Oct 17, 2016, at 15:29, Ron Feldman <ronald....@linq3.com> 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

Reply all
Reply to author
Forward
0 new messages