Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Notepad++ to remember last session?

Tags:

notepad++

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?

like image 848
user2314520 Avatar asked Apr 30 '13 00:04

user2314520


People also ask

How do you save a Notepad session?

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.

How can I see Notepad++ history?

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.

Does Notepad++ automatically save?

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).


3 Answers

For me, the resolution was a combination of things. Below is what I did to fix it:

  1. Completely quit out of Notepad++
  2. Deleted the session.xml file found here: C:\Users\XXXX\AppData\Roaming\Notepad++
  3. Open Notepad++
  4. Navigate to: Settings -> Preferences -> Backup
  5. Ensure that "Remember current session for next launch" and "Enable session snapshot and periodic backup" are selected

These items allowed me to get my program to remember previous session, and open where I left off.

like image 91
Spacenerd Avatar answered Nov 16 '22 08:11

Spacenerd


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.

like image 39
Kevin Field Avatar answered Nov 16 '22 06:11

Kevin Field


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?

like image 24
mmp Avatar answered Nov 16 '22 08:11

mmp