Automatically reopen last files?
Moderators: AmigoJack, bbadmin, helios, MudGuard
Automatically reopen last files?
I know about TextPad's "Workspaces" feature, which lets you save and reopening specific sets of files.
But I work with different combinations of files all the time. I'd like to be able to have TextPad reopen the last files I was using, whatever they were, when I last exited it. In other words, just a simple, general option to do that without having to save each random file-combination as a "Workspace" that I'll probably never use again.
Is there a way to do this? If not, how about adding it?
But I work with different combinations of files all the time. I'd like to be able to have TextPad reopen the last files I was using, whatever they were, when I last exited it. In other words, just a simple, general option to do that without having to save each random file-combination as a "Workspace" that I'll probably never use again.
Is there a way to do this? If not, how about adding it?
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Not built in as a feature now unless you use Workspaces.
But, if that does not work, maybe you could make a macro to call when exiting....
The macro would get the names of all the open files and write them to a file.
You could use Edit/Insert/Filename, Copy to Clipboard, Paste into temp filename. Repeat for each open file. Then save that temp filename, and close all files.
Then start TextPad with @filename parameter. That will have TextPad open all the files in the filename referenced. You could modify a shortcut to include that parameter.
But, if that does not work, maybe you could make a macro to call when exiting....
The macro would get the names of all the open files and write them to a file.
You could use Edit/Insert/Filename, Copy to Clipboard, Paste into temp filename. Repeat for each open file. Then save that temp filename, and close all files.
Then start TextPad with @filename parameter. That will have TextPad open all the files in the filename referenced. You could modify a shortcut to include that parameter.
Last edited by Bob Hansen on Thu Apr 24, 2008 6:05 pm, edited 1 time in total.
Hope this was helpful.............good luck,
Bob
Bob
Thanks for the idea, Bob. That's a pretty imaginative workaround. If I follow you, though, I'd have to remember to run the macro every time I exited. It'd be so much better just to have a set-and-forget option to do it by default.
I was a bit surprised TP didn't have this feature. Nearly every other serious text editor I've tried has had it.
Maybe earlier TP versions did; then Workspaces was added and considered a superior replacement. But they're really two different things. I wish TP had both.
I was a bit surprised TP didn't have this feature. Nearly every other serious text editor I've tried has had it.
Maybe earlier TP versions did; then Workspaces was added and considered a superior replacement. But they're really two different things. I wish TP had both.
-
HerNameWasTextPad
- Posts: 59
- Joined: Fri Apr 18, 2008 3:25 am
Unless I'm missing what you're saying, the answer is very simple:
Just define a workspace called "LastBunch." Open and close, in this workspace, whatever files you want, whenever you want.
Whenever you close an instance of TextPad in which the LastBunch workspace is open, TextPad will automatically save the LastBunch workspace before ending its run. Then, at the start of your next session, just open an instance of TextPad--and open the workspace called "LastBunch." All of the files on which you were last working will open, stare at you, and say, "Hey Buddy, welcome back!"
Here's how to define the LastBunch workspace:
(1) Open an instance of TextPad if none are open!
(2) Open as many files as you want.
(3) File -> Workspace -> Save As . . .
(4) Save as "LastBunch" (without the quotes).
(5) File -> Exit
(6) Launch a new instance of TextPad.
(7) File -> Workspace -> Open . . .
Note: Depending upon your preferences, you might even see the LastBunch workspace listed on the File -> Workspace menu, so you can just click on that in order to open it instead of going to File -> Workspace -> Open . . .
Just define a workspace called "LastBunch." Open and close, in this workspace, whatever files you want, whenever you want.
Whenever you close an instance of TextPad in which the LastBunch workspace is open, TextPad will automatically save the LastBunch workspace before ending its run. Then, at the start of your next session, just open an instance of TextPad--and open the workspace called "LastBunch." All of the files on which you were last working will open, stare at you, and say, "Hey Buddy, welcome back!"
Here's how to define the LastBunch workspace:
(1) Open an instance of TextPad if none are open!
(2) Open as many files as you want.
(3) File -> Workspace -> Save As . . .
(4) Save as "LastBunch" (without the quotes).
(5) File -> Exit
(6) Launch a new instance of TextPad.
(7) File -> Workspace -> Open . . .
Note: Depending upon your preferences, you might even see the LastBunch workspace listed on the File -> Workspace menu, so you can just click on that in order to open it instead of going to File -> Workspace -> Open . . .
I came in on 4.5 in 2001, moved to 4.7.2 in 2004, moved to 4.7.3 in 2007, moved to 5.4 in 2010, and am excited about 2013. I've said it many times before, and I'll say it many times again: "I love this program."
-
HerNameWasTextPad
- Posts: 59
- Joined: Fri Apr 18, 2008 3:25 am
If you're still not fully satisfied, do this:
Configure -> Preferences... -> General
[x] Reload last workspace at startup
Since I'm always launching multiple instances of TextPad, I prefer to keep this box unchecked and open workspaces manually. . . .
Configure -> Preferences... -> General
[x] Reload last workspace at startup
Since I'm always launching multiple instances of TextPad, I prefer to keep this box unchecked and open workspaces manually. . . .
I came in on 4.5 in 2001, moved to 4.7.2 in 2004, moved to 4.7.3 in 2007, moved to 5.4 in 2010, and am excited about 2013. I've said it many times before, and I'll say it many times again: "I love this program."
Well, I'll be darned. As long as I have "Reload Last Workspace" selected, it does reload whatever files were open when I last exited. I just had to save something as a Workspace. I didn't try that because I assumed that when you saved a Workspace, you were saving a specific set of filenames.
Which is, I gather, another way to use it: to specify multiple sets of specific files. If you save more than one Workspace, and you have "Reload Last Workspace" selected, then you can load previously-saved sets that do remain the same---unlike the Workspace you leave open before you exit, which, if you've changed it, doesn't remain the same... Er, right?
Ack, my head's spinning. Anyway, it doesn't matter, I'm happy. Thanks.
Which is, I gather, another way to use it: to specify multiple sets of specific files. If you save more than one Workspace, and you have "Reload Last Workspace" selected, then you can load previously-saved sets that do remain the same---unlike the Workspace you leave open before you exit, which, if you've changed it, doesn't remain the same... Er, right?
Ack, my head's spinning. Anyway, it doesn't matter, I'm happy. Thanks.
-
HerNameWasTextPad
- Posts: 59
- Joined: Fri Apr 18, 2008 3:25 am
Don't worry: After a while, your head's spin will begin to slow to something manageable and your mouth will say things like, "I love this program," "I am now a true power user," "My text editor can do everything yours can and more," and "TextPad to the rescue!"
Saving a workspace is basically saving the state of TextPad at that particular moment. In other words, you're taking the state of TextPad--whatever files are open (which of course includes the possibility of NO files, which then would be called "an empty workspace"), whatever bookmarks have been toggled in those files, whatever document properties have been localized for a file or files, etc.--and simply giving that state a filename, which has the .tws file extension, and which is then called a "workspace." You can hold 'em in any folder you want. I've got a folder that holds workspace files in my startup folder (Configure -> Preferences... -> Folders -> Startup).
This means also that, when you have a workspace open and you toggle some bookmarks or whatever, you can save (i.e., update) the workspace immediately (just as you would a document after making an edit), so that you don't have to wait until the end of your session for the workspace to save automatically--and risk losing changes in the event of a power outage that occurs before the end of your session.
Suppose you want to go from 4 open files in a workspace to 3, i.e., you want to close one of the files in the workspace. Do so, and just save the same workspace immediately so that your change to it is saved immediately.
Remember that, in an instance of TextPad, you can close any workspace at any time, open any other, close THAT one, open again the one you had open BEFORE, etc. Only one workspace can be open at a time (in each instance of TextPad), so the situation will remain intelligent and manageable.
Once your head's spin slows a little, you'll likely find yourself opening multiple instances of TextPad, each with it's own open workspace. Sometimes I've got 7 instances and 4 workspaces running at once!
I've defined the available keyboard shortcut Alt+K to save the active workspace quickly and easily:
Configure -> Preferences... -> Keyboard -> File -> WorkspaceSave
Whether you automatically "reload" the workspace that you had open at the time when you last closed TextPad is just another option. I never use that feature, so I'm guessing that, if "reload" is checked and you close TextPad with no workspace open, then the "reload" option will remember that, too, and just launch TextPad at the next session with NO workspace (?). Maybe you can let me know whether this guess is correct.
Saving a workspace is basically saving the state of TextPad at that particular moment. In other words, you're taking the state of TextPad--whatever files are open (which of course includes the possibility of NO files, which then would be called "an empty workspace"), whatever bookmarks have been toggled in those files, whatever document properties have been localized for a file or files, etc.--and simply giving that state a filename, which has the .tws file extension, and which is then called a "workspace." You can hold 'em in any folder you want. I've got a folder that holds workspace files in my startup folder (Configure -> Preferences... -> Folders -> Startup).
This means also that, when you have a workspace open and you toggle some bookmarks or whatever, you can save (i.e., update) the workspace immediately (just as you would a document after making an edit), so that you don't have to wait until the end of your session for the workspace to save automatically--and risk losing changes in the event of a power outage that occurs before the end of your session.
Suppose you want to go from 4 open files in a workspace to 3, i.e., you want to close one of the files in the workspace. Do so, and just save the same workspace immediately so that your change to it is saved immediately.
Remember that, in an instance of TextPad, you can close any workspace at any time, open any other, close THAT one, open again the one you had open BEFORE, etc. Only one workspace can be open at a time (in each instance of TextPad), so the situation will remain intelligent and manageable.
Once your head's spin slows a little, you'll likely find yourself opening multiple instances of TextPad, each with it's own open workspace. Sometimes I've got 7 instances and 4 workspaces running at once!
I've defined the available keyboard shortcut Alt+K to save the active workspace quickly and easily:
Configure -> Preferences... -> Keyboard -> File -> WorkspaceSave
Whether you automatically "reload" the workspace that you had open at the time when you last closed TextPad is just another option. I never use that feature, so I'm guessing that, if "reload" is checked and you close TextPad with no workspace open, then the "reload" option will remember that, too, and just launch TextPad at the next session with NO workspace (?). Maybe you can let me know whether this guess is correct.
I came in on 4.5 in 2001, moved to 4.7.2 in 2004, moved to 4.7.3 in 2007, moved to 5.4 in 2010, and am excited about 2013. I've said it many times before, and I'll say it many times again: "I love this program."
HerNameWasTextPad > Saving a workspace is basically saving the state of TextPad at that particular moment. In other words, you're taking the state of TextPad--whatever files are open (which of course includes the possibility of NO files, which then would be called "an empty workspace"), blah blah blah blah...
Yes, yes, I gathered all that. You save a Workspace, then you can open it later. That's the idea. And that's why I imagined I'd have to re-save my currently-opened files as a Workspace each time I exited, so TP would re-load them next time.
But no. If you save a Workspace just once, then close some of its files, open others, and eventually exit, on the next run TextPad re-loads the files that were open---not the files you saved as a Workspace. Which isn't what you'd expect, but it's exactly what I wanted it to do, so I'm not complaining.
In terms of sheer theory, though, yes---TP seems to automatically change the definition of the last-opened Workspace to whatever happens to be open when you exit. Which is exactly the opposite from what you'd think a Workspace was supposed to be---that is, saving specific files, not just what happened to be open. But I'm sure it all makes sense on some level, somewhere, probably. Perhaps if we had a bit more coffee, or used more italics.
Yes, yes, I gathered all that. You save a Workspace, then you can open it later. That's the idea. And that's why I imagined I'd have to re-save my currently-opened files as a Workspace each time I exited, so TP would re-load them next time.
But no. If you save a Workspace just once, then close some of its files, open others, and eventually exit, on the next run TextPad re-loads the files that were open---not the files you saved as a Workspace. Which isn't what you'd expect, but it's exactly what I wanted it to do, so I'm not complaining.
In terms of sheer theory, though, yes---TP seems to automatically change the definition of the last-opened Workspace to whatever happens to be open when you exit. Which is exactly the opposite from what you'd think a Workspace was supposed to be---that is, saving specific files, not just what happened to be open. But I'm sure it all makes sense on some level, somewhere, probably. Perhaps if we had a bit more coffee, or used more italics.
-
HerNameWasTextPad
- Posts: 59
- Joined: Fri Apr 18, 2008 3:25 am
Almost: . . . not the files that you ORIGINALLY saved as a particular workspace, but those that you AUTOMATICALLY saved, whether you realized it, at the time of your closing the instance, by your actively closing the instance. Had you not closed the instance, the workspace would not have been saved; had the power gone out, you would have wound up with the files that originally constituted the workspace, at the next launch. This is to say that YOU, not TextPad, really do save the workspace at least twice--once manually when creating it and once automatically when closing the instance. Of course, you should save it often in between, too.. . . not the files you saved as a Workspace.
I came in on 4.5 in 2001, moved to 4.7.2 in 2004, moved to 4.7.3 in 2007, moved to 5.4 in 2010, and am excited about 2013. I've said it many times before, and I'll say it many times again: "I love this program."