Notepad++ Is there a setting to stop from asking me to save on exit?

I'd like the option to have Notepad++ exit, and close individual tabs without asking me if I want to save every file where edited.

I tend to run with a lot of tabs open, and am capable of remembering to save when I need to. Being asked to save when closing multiple is annoying, and a little dangerous in that if the modal dialogue box moves on each tab, there is a chance of accidentally hitting yes when I didn't mean to.

Update 07/2020

In a recent version of Notepad++ there is a 'No to all' option when closing Notepad++ down. This has mitigated the issue somewhat, although I would still like to see a setting that just allowed me to close everything without saving along with the main window.


Yes, there is. In Backup page of Preferences, be sure you check

  • Remember current session for next launch

  • Enable session snapshot and periodic backup

enter image description here

▶ Then Notepad++ exits immediately without asking.

Open documents are retained, but it is as easy as pressing Ctrl+W to close them. You can also assign some shortcut to Close All command (suggestion: Ctrl+Shift+W).


EDIT: You can close individual tabs if they have no name yet without warning (but keeping Notepad++ open) when you press Ctrl+A and then Delete right before closing the tab. You can even try to create a macro for that. If not Notepad++ macro, then AutoHotKey macro will easily do it.

Note that there is no way to do this for unsaved documents which already have the name. I checked the source code. So after closing unnamed documents you can get rid of the rest by using Save All command and then closing any remaining documents you want.

If your tabs are mixed (new, exsting, new, existing, ...), it is better to create AutoHotKey macro which invokes closing and then presses No button in case if the save dialog appears. This will close current tab without saving regardless of its new or existing state.

There is yet another option how to avoid the question on closing a tab: you can download source code of Notepad++, modify it (so the dialog is never shown), build it and start using your own Notepad++ build.

You can also request the feature at N++ home page, but here is the risk that it could be viewed as rare corner-case and you might be waiting very long until someone implements it (if ever).


I just had this problem when I had demonstrated to a colleague how to find/replace on 150 files in a folder I didn't have write access to. My solution is a bit of a hack, but it works. I went into C:\users\[username]\AppData\Roaming\Notepad++\backup and deleted all the files in there. Then I force-quit Notepad++ with the task manager and open it back up. It still has the files I had open but now they show as unchanged, so I can hit Close All and they close without dialogs.

An alternate option appears to change the session.xml file in there and just take out all the files you had open.