N++ used to save sessions on shutdown without fail. Now it fails about half the time.
-
Checking to see if this is a known issue or whether it’s more likely an issue with Windows, etc. – and if there’s any way to mitigate it.
Basically, I use N++ a lot, with lots of tabs open at all times. Often times, when I’m just scratching down some notes, I don’t think to save the file anywhere.
For many, many years, this never posed a problem. Every time I opened N++ all of my past tabs were there, without fail. Now, just in the last few months, I find that I frequently (but not always) open it to find no tabs open.
I know I can dig around in the backups folder, but it’s … not a desirable way to function.
Any ideas?
-
@Antisomniac said in N++ used to save sessions on shutdown without fail. Now it fails about half the time.:
Checking to see if this is a known issue or whether it’s more likely an issue with Windows, etc
I have never seen the active session get clobbered, so that it opens without remembering the current session. Ways to mitigate:
- Don’t use multiple instances of Notepad++ open at the same time – that is, make sure Settings > Preferences > Multi-Instance is set to ☑ Default (mono-instance), and don’t use the
-multiInst
command-line option. Notepad++ only has one default session, and when you have multiple instances open at the same time, then it saves the session and other settings for whichever instance you happen to close last – this might clobber the defaultsession.xml
compared to what you hope it would be. - Use File > Save Session to manually save the Session to a named session; if you lose your default session again, you can manually File > Load Session to get it back. Unfortunately, this won’t help with unnamed files, but at least it won’t forget what other files you have open.
- Use View > Project Panels to create one or more Projects which define sets of files that are grouped in your mind, to be able to easily access them. Again, this won’t help with unnamed files.
- Use Settings > Preferences > Backup and uncheck ☐ Enable session snapshot and periodic backup; once you do this, every time you exit, if you have unsaved files (whether edits to named files, or new unnamed files that haven’t been saved yet), Notepad++ will ask you to save each of the files, and this way you avoid the root cause of “I don’t think to save the file anywhere”
- Use Plugins > Plugins Admin to install the
AutoSave
plugin, then configure it (see my notes in this recent discussion I am linking here, where it shows the default AutoSave config, and explains how to change it in order to make it actually do the auto-saving) – used properly, this can help you avoid “I forgot to save the temporary file”-syndrome. - Teach yourself to “Save Early, Save Often”. And if you use external backup software, version control, and/or cloud services, you can have external locations where you data is backed up so that if something does go wrong, you don’t lose too much data.
- Don’t use multiple instances of Notepad++ open at the same time – that is, make sure Settings > Preferences > Multi-Instance is set to ☑ Default (mono-instance), and don’t use the