I'm on windows 7. Because I work sometimes on long projects I'd like notepad++ to remember the last session instead of me having to save new sessions and load them manually. I set the MISC tab in the settings to remember the last session, but it never does. I installed notepad++ in programfiles and appdata as default. However, everytime I start notepad++ it starts with "new 1". It's extremely annoying. Any way to fix it?
When you load the session, all of that information is loaded back into Notepad++. File > Load Session… can be used to load an existing session. File > Save Session… can be used to save the currently-open files as a session.
With "Simple backup" just the previous version of the file is saved. Settings > Preferences > Backup tab > Click Verbose Backup This will time stamp a copy of your file every time you save. The saved file has a . bak extension which can be opened by any text editor.
With Notepad++'s built-in “save/open last session” + “enable session snapshot and periodic backup”, Notepad++ automatically saves a backup of all edited-but-not-saved files into the defined backup directory, every N seconds (as defined by preference setting – defaults to 7sec).
For me, the resolution was a combination of things. Below is what I did to fix it:
These items allowed me to get my program to remember previous session, and open where I left off.
Similar to mmp's answer (made a copy of session.xml then deleted the original). I went to Settings -> Preferences -> Backup and placed a checkmark in 'Enable session snapshot and periodic backup'. This caused a new session file to be created in my backup path. Not sure if this was on previously and inadvertently turned off, but I will check with my cat.
I had this issue also (Windows 7). I noticed the ./AppData/Roaming/Notepad++/session.xml file was not being updated when I closed out of Notepad++ and I think it should have been. So, I closed Notepad++, made a copy of session.xml then deleted the original. I then reopened Notepad++, opened a new page or two and closed it and it appears to now be working correctly as the pages were saved (so far). Sounds like maybe the above mentioned "corrupted file" was the issue?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With