I have been looking and looking for a text editor that properly handles sessions, like how Firefox's session saving works.
Basically, this is what I want to either know how to do, or functionality I would like in a new version:
1: Automatically store all new/opened documents in some sort of temporary file, regardless if I have 'save'd them via the save option, so that they can be restored upon reloading -- if NPP crashes/forced to quit.
1a: If I want to just close out NPP with the 'X' button, either automatically use the saved temp files upon reload, or, prompt to "save all open files as (default/named) session." This way it won't ask me to save the 10 new tabs I create on a daily basis for temporary things, but I don't want to have to keep finding every saved file, or saving a certain session that doesn't come back or something.
2: Automatically re-open every document from the previous session if the program crashes, or if I just decide to hit the X button.
3: If I decide to use a named session file (rather than the 'default session') I have seen in the messageboards that any new documents opened won't get saved in the named session. Can this be implemented somehow?
4: More often than not, the only time NPP closes is if I do a restart of the entire system. This causes me to have to close/save every individual file I have open (thats not already saved) and often upon reloading NPP the set of open files just disappears. This is more the reason I ask for 1-3 above, but if this is a separate issue, I would prefer upon closing to reboot, that #1 is executed..
I hope this makes sense.
If you want some sort of visual reference, grab Firefox and the TabMixPlus addon;
Set the TabMixPlus options to [x] Use Firefox's built-in session restore and [x] Enable Crash Recovery.
Try killing off firefox, closing naturally, whatnot.. and see how the tabs come back up. I would love this behaviour as default with NPP, but often it does not work this way.
In short; if I manually close NPP via File - Exit, or the X button, save all tabs (to temp files so that changes can be detected from actual "saved" files vs those currently being edited before "save"ing them) and upon reloading NPP reload all tabs that were open previously, with no exception.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the Explorer plugin tip. I just downloaded it and started to play with it a bit.
It seems it does the trick I´ve asked for. Should have known better. :-)
Thank you again and best regards,
Paulo Cezar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is an option in Settings -> Preferences -> MISC to "Remember the current session for next launch" which handles opening whatever you had opened the last time you closed NP++.
Unfortunately NP++'s crash recovery is terrible, so if NP++ crashes and you reopened, the files will be those that were opened the last time you naturally closed it.
NP++ also has the ability to save and load 'named sessions', under the File menu.
As for having unsaved files saved to temp files so that on reopening NP++, it remembers their 'saved' status, this may be possible, but I don't know how beneficial this would be. Preferred would be to attempt to save the unsaved data to the files themselves, and write the undo history for each file to the current session.
(I suppose a better idea for current session management would be to auto-update the current session file as changes are made).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Named sessions are very nice and I use them a lot, but *I* must remember where I´ve saved them instead of having N++ remembering the last ones for me :-)
It would be nice to have a new "Session" item in the main menu (Some of its submenu items could be "New..", "Open...", "Close...", "Save" and of course "Recent Sessions") but if this is not possible how about adding a "Recent Sessions" under the File menu item?
I´m new to the forum so pardon me if I missed something and this has been asked before.
Cheers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Explorer Plugin exist a Favorite pane. This pane allows you to store and manage sessions. I will release a new version with UNICODE support in mid of November.
Best Regards
Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have been looking and looking for a text editor that properly handles sessions, like how Firefox's session saving works.
Basically, this is what I want to either know how to do, or functionality I would like in a new version:
1: Automatically store all new/opened documents in some sort of temporary file, regardless if I have 'save'd them via the save option, so that they can be restored upon reloading -- if NPP crashes/forced to quit.
1a: If I want to just close out NPP with the 'X' button, either automatically use the saved temp files upon reload, or, prompt to "save all open files as (default/named) session." This way it won't ask me to save the 10 new tabs I create on a daily basis for temporary things, but I don't want to have to keep finding every saved file, or saving a certain session that doesn't come back or something.
2: Automatically re-open every document from the previous session if the program crashes, or if I just decide to hit the X button.
3: If I decide to use a named session file (rather than the 'default session') I have seen in the messageboards that any new documents opened won't get saved in the named session. Can this be implemented somehow?
4: More often than not, the only time NPP closes is if I do a restart of the entire system. This causes me to have to close/save every individual file I have open (thats not already saved) and often upon reloading NPP the set of open files just disappears. This is more the reason I ask for 1-3 above, but if this is a separate issue, I would prefer upon closing to reboot, that #1 is executed..
I hope this makes sense.
If you want some sort of visual reference, grab Firefox and the TabMixPlus addon;
Set the TabMixPlus options to [x] Use Firefox's built-in session restore and [x] Enable Crash Recovery.
Try killing off firefox, closing naturally, whatnot.. and see how the tabs come back up. I would love this behaviour as default with NPP, but often it does not work this way.
In short; if I manually close NPP via File - Exit, or the X button, save all tabs (to temp files so that changes can be detected from actual "saved" files vs those currently being edited before "save"ing them) and upon reloading NPP reload all tabs that were open previously, with no exception.
Hi Jens,
Thank you for the Explorer plugin tip. I just downloaded it and started to play with it a bit.
It seems it does the trick I´ve asked for. Should have known better. :-)
Thank you again and best regards,
Paulo Cezar
There is an option in Settings -> Preferences -> MISC to "Remember the current session for next launch" which handles opening whatever you had opened the last time you closed NP++.
Unfortunately NP++'s crash recovery is terrible, so if NP++ crashes and you reopened, the files will be those that were opened the last time you naturally closed it.
NP++ also has the ability to save and load 'named sessions', under the File menu.
As for having unsaved files saved to temp files so that on reopening NP++, it remembers their 'saved' status, this may be possible, but I don't know how beneficial this would be. Preferred would be to attempt to save the unsaved data to the files themselves, and write the undo history for each file to the current session.
(I suppose a better idea for current session management would be to auto-update the current session file as changes are made).
What about a MRU List of named sessions?
Named sessions are very nice and I use them a lot, but *I* must remember where I´ve saved them instead of having N++ remembering the last ones for me :-)
It would be nice to have a new "Session" item in the main menu (Some of its submenu items could be "New..", "Open...", "Close...", "Save" and of course "Recent Sessions") but if this is not possible how about adding a "Recent Sessions" under the File menu item?
I´m new to the forum so pardon me if I missed something and this has been asked before.
Cheers.
I agree that better session management would be nice. I don't think this has been asked before.
In Explorer Plugin exist a Favorite pane. This pane allows you to store and manage sessions. I will release a new version with UNICODE support in mid of November.
Best Regards
Jens