3

How can I save all open documents in a TextWrangler session such that I can open the same session at a later time? (Looking for something comparable to Notepad++ file->Save Session / Load Session features)

The "Reopen documents that were open at last quit" preferences option saves and restores the session automatically, so that data must be stored somewhere, so a potential solution is to identify that save file and then backup/restore it. Where are "documents that were open at last quit" stored?

Dan
  • 283

2 Answers2

1

Just try to make a copy and save with another name of this folder:

/Users/[yourusername]/Library/TextWrangler

also you must do the same with:

/Users/[yourusername]/Library/Application\ Support/TextWrangler/Auto-Save\ Recovery

Miquel
  • 11
0

Note: this works only with TextWrangler, not with BBEdit.

The open Documents are saved in ~/Library/Preferences/com.barebones.textwrangler.PreferenceData/Saved Application State.appstate

You can copy various states and switch the state you need (quit TextWrangler before you make changes).

I would add any extra states in ~/Library/Preferences/com.barebones.textwrangler.PreferenceData/ like this:

Saved Application State.appstate [your current state without a number]
Saved Application State-1.appstate
Saved Application State-2.appstate
Saved Application State-3.appstate

To switch the current state to 1, make the current state State-4, and remove the number from State-1. It's a bit awkward, but this state wasn't supposed to be for changes.

Since TextWrangler is sometimes unstable with documents, like losing the whole window (especially on systems after El Capitan), it helps to recover with the saved application state. I use the Time Machine to get the last state before a crash.

Destroy666
  • 12,350
Timm
  • 101