Reputation: 1508
I accidentally opened a very, very large file (well not accidentally, but I didn't think it would crash Notepad++). Now whenever I try to open Notepad++, the program crashes, so I can't just turn off the setting. I also don't have admin privileges.
Upvotes: 72
Views: 68066
Reputation: 113
Simply delete
C:\Users\<YourUsername>\AppData\Roaming\Notepad++\session.xml
and
C:\Users\<YourUsername>\AppData\Roaming\Notepad++\config.xml
After that, the Notepad++ history of previously opened files will be empty.
Since Notepad++ v8.4.7 for recent files history clearing use menu File > Empty Recent Files List
After clearing the File menu will be look like:
Upvotes: 6
Reputation: 14047
You might be able to run Notepad++ with the -nosession
command line flag which is documented as "Launch Notepad++ without previous session" (An earlier version of the documentation had "Use this parameter to launch Notepad++ without loading the previous session (the files opened in Notepad++ at the last time).)."
The session.xml
file, plus other configuration files, can be in various locations. See the "Configuration Files Location" section of this page for the locations. (Actually the file locations are discussed in several places on that page.)
See also this answer Notepad ++ doesn't save document on exit? which is about controlling whether Notepad++ reloads all its previous tabs when it is restarted.
Upvotes: 10
Reputation: 2125
Take a backup of your file and delete the one which you tried open in Notepad++. Your Notepad++ should resume to its normal state. You can then copy the file to its original path from the backup you took.
For large files, use EmEditor
Upvotes: 0
Reputation: 301
Access the below file:
%AppData%\Notepad++\config.xml
Delete unwanted search cache marked as <Find name = “ BAD SEARCH”>
Upvotes: 0
Reputation: 191
Notepad++ v7.4.2 (32bit) | This solution requires no extra effort before or after launching Notepad++.
Settings/Preferences/Backup
Uncheck "Remember current session for next launch"
It's at top under [Session snapshot and periodic backup]
Upvotes: 1
Reputation: 39
Type the path in the windows file explorer as follows:
C:\Users\USER NAME HERE\AppData\Roaming\Notepad++\backup
Clear everything in this folder and that's it!
Upvotes: 3
Reputation: 4097
Delete
C:\Users\<YourUsername>\AppData\Roaming\Notepad++\session.xml
or shorter
%AppData%\Notepad++\session.xml
Upvotes: 116