55

Situation:

Open a text file in n++, make some modification, press ALT-F4 or Close program. The N++ won't ask "Do you want to save your changes". Instead it quits and text file on hdd remains unchanged.

But when I open the N++ again, the MODIFIED file is still in there. Red tab is indicating unsaved changes and I can save it by ctrl-s. I can also save it by closing the tab (n++ will ask).

I want to save the file automatically every time I close the n++. All of my other istallations does that but this. I could not find any settings in the n++ options. Any idea?

Combinatix
  • 1,186
  • 3
  • 12
  • 24
  • probably duplicate http://stackoverflow.com/questions/18656899/is-there-an-autosave-function-plugin-for-notepad – Kasper Ziemianek Jun 27 '14 at 08:57
  • 3
    @xwid I think it is the new **Session snapshot & periodic backup** feature, not the older **Autosave** plugin. – AdrianHHH Jun 27 '14 at 09:33
  • 3
    Sweet! This is the feature I somehow lost on npp. It's great to have npp keep my files with notes open, without saving them. It's so mindbogglingly stupid that it won't just allow you to continue where you left off and instead get those archaic time blockers when you want to shut down your computer. Obviously if I wanted to save my files they'd been saved by now, just keep them alive or even trash them, I don't even care if I can avoid such a retarded pop-up. – MrFox Mar 25 '16 at 07:54
  • Agree with @MrFox I too miss this feature after updating the n++. Please anyone do let me know how to enable this feature that doesn't ask to save new docs and opens as they were before closing the n++ – Arjun_TECH Jan 04 '19 at 13:53

5 Answers5

92

New feature added in Notepad 6.6 for which the release notes say:

The main feature of this release is Session snapshot & periodic backup. If this feature is enabled (enabled by default), user won't be asked to save unsaved file as he quits Notepad++, and on startup Notepad++ restores the unsaved file and unsaved untitled document of last session.

This facility is controlled via menu => Settings => Preferences => Backup. For more details see also this section of the Notepad++ User Manual.

AdrianHHH
  • 13,492
  • 16
  • 50
  • 87
  • 19
    This feature is pointless, why would I want this for a saved file, do a change and close notepad++ and not asking me to save?? at least they should've made it disabled by default! nearly messed up all my test databases thanks to this as a change in a sql script didn't get saved! – David Aleu Nov 28 '14 at 09:23
  • 12
    The backup is nice. The problem is "user won't be asked to save unsaved file as he quits", which should be nothing to do with backups. – James May 01 '15 at 12:42
  • 23
    I personally **love** this feature and was actually searching for how to **enable** it again. The feature is obviously disabled by default (Notepad 7.2.2). I often create new editors (tabs) and paste in some snippets. I do not want to create a new file for each of those editors, but I want to close Notepad++ without loosing all those temporary snippets. – niks Dec 23 '16 at 10:40
  • 2
    This feature just cost me half an hour when I edited a file, forgot to save it and quit Notepad++, which silently quit without warning. Then I wanted to make sure the edit is there, opened npp and did not notice the star. Thing is, this behavior is unexpected and if used, it should generate a big warning. – comodoro Mar 08 '17 at 09:37
  • 3
    I agree that the backup feature is great. I love being able to make temp notes without having to explicitly save them supplying a file name and location. However, I would greatly appreciate a prompt to save on exit regarding those files that are already established with a file name (not the temp ones which I haven't explicitly saved yet). – Turbo Sep 22 '17 at 11:32
  • Yes, this worked for me, but as previous commenter stated, the feature/checkbox seems to be disabled by default v8.4.7, Build Nov 1, 2022 -- so you need to check/enable it. – Peter Smith Dec 22 '22 at 09:44
17

As an answer to your question, in the afore mentioned Settings => Preferences => Backup window, uncheck the "Remember current session for next launch" setting. Now you will be prompted to save any modified files when exiting.

Aidan
  • 5,346
  • 2
  • 19
  • 18
8

This is actually a great feature. First, Periodic backup is great it can prevent data lost when pc suddenly shutdown or crash.

The feature: don't ask to save files is also great.

For me, I opened a lot of files in notepad, also create a lot of tmp files(I don't want to save these tmp files, but it may be useful for x days), in previous version, when I close notepad++(reboot pc or install new version), it asks me whether save all these files. It's a nightmare.

This feature helps me a lot.

Also there is no data lost - all your data is still there after restart. So really nothing to complaint.

jeffery.yuan
  • 1,177
  • 1
  • 17
  • 27
  • 1
    I completely agree and a new installation reminded me how much I used this feature. – Stevoni Jun 25 '15 at 23:47
  • 2
    also agree, makes notepad++ great for a temp pad. – Choco Smith Jun 27 '15 at 10:41
  • 2
    "don't ask to save files" is IMO bad, especially as the default. It just is not what you expect from an editing program. Ever since the dark ages of vi and emacs we have expected a reminder to save on close. Other 'editors' like word processors, video editors 3D modelling programs all do the same. So it was a real shock when I released all my changes on Friday night and then on Monday morning opened Notepad++ to discover a key change was unsaved. – James Mar 21 '16 at 18:41
  • 2
    @James times have moved past vi and emacs, we have better tools now. Like Chrome, so know we know the massive benefits of continuing work where we left off. Instead of having to do the dumb work of saving every individual file. I say this is npp's best feature. When I work on something that needs saving I save it all the time. Like every sentence or line of code I type. – MrFox Mar 25 '16 at 07:59
  • 3
    Disagree. It causes me to loose changes I've made in other editors – Patman May 09 '18 at 04:17
4

Yeah - i also love this feature.

If you turn on backup then it does an backup - which i dont want and need.

My solution - Turn Backup on and use Custom Backup Directory As Directory use NUL

Now its working like expected

mr netlord
  • 195
  • 1
  • 3
  • 11
1

This facility is controlled via menu => Settings => Preferences => Backup.

UnCHECK: "Enable Session Snapshot and Periodic Backup"

Configuración / Preferencias / Backup Quitar CHECKS a Recordar la sesión actual en el próximo inicio

R.Alonso
  • 989
  • 1
  • 8
  • 9