By user2314520


2013-04-30 00:24:56 8 Comments

I'm on windows 7. Because I work on sometimes 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. Anyway to fix it?

5 comments

@Chris R. Timmons 2013-04-30 00:56:23

Sounds like Notepad++ is being run with the -nosession command line option. Assuming you're starting Notepad++ from a shortcut, delete that option if it's present.

If -nosession isn't present, then something else is either preventing the session from being saved when Notepad++ closes, or from being loaded when Notepad++ starts. Some things to investigate:

  • Using @thirdy's suggestion, run Notepad++ as an administrator and see if it will or won't automatically save and load the session data.
  • Look for the file C:\Users\{your user name here}\AppData\Roaming\Notepad++\session.xml. This is this file where Notepad++ auto-saves the session data. Does its timestamp match the last time Notepad++ was closed? Do the contents of session.xml look corrupted in some way?
  • Make sure the Windows account Notepad++ is running under has read/write privileges in the folder where session.xml resides. It's a long shot, but worth checking.
  • Check the Windows Application log to see if Notepad++ generated any error messages that might shed some light on why the session isn't being saved and/or loaded.

@user2314520 2013-04-30 02:13:36

The session.xml file is always updated when it is closed. by default all the values were set to 0.

@Kevin Field 2018-03-16 00:48:27

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.

@Devolus 2018-03-29 08:42:22

This one solved it also my case. After an update it was disabled. :(

@Robert Logan 2016-09-26 21:03:16

On the "Find in Files" dialog after Ctrl-Shift-F I had the "Follow current doc." checkbox checked.

Uncheck this and notepad++ will remember the last path you searched.

@stingray_ 2015-12-01 06:57:53

My issue occurred when I installed XML Tools plugin. The option "Set XML type automatically" caused the xml file not to be updated.

I disabled(unchecked this option) and the session.xml is now updated automatically.

@mmp 2013-05-24 17:55:52

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?

@JohnP 2014-05-29 15:54:39

This fix worked for me, including the latest update to version 6.6.3. +1

@BAERUS 2017-02-15 16:01:13

Perfect! Now it works again :) I also deleted the current files inside of "backup" as it was (of course) filled up with quite a lot of old data. Maybe too full? Btw I am using Win8.1Pro

Related Questions

Sponsored Content

20 Answered Questions

[SOLVED] Removing empty lines in Notepad++

  • 2010-10-05 17:11:35
  • nomoreflash
  • 404751 View
  • 312 Score
  • 20 Answer
  • Tags:   regex notepad++

10 Answered Questions

[SOLVED] Removing duplicate rows in Notepad++

  • 2010-10-18 10:42:56
  • UGEEN
  • 491062 View
  • 514 Score
  • 10 Answer
  • Tags:   notepad++

17 Answered Questions

[SOLVED] How to format XML in Notepad++?

15 Answered Questions

[SOLVED] How to reformat JSON in Notepad++?

  • 2009-10-13 14:06:31
  • Donny V.
  • 421707 View
  • 647 Score
  • 15 Answer
  • Tags:   json notepad++

11 Answered Questions

[SOLVED] Notepad++ add to every line

  • 2012-06-12 19:48:01
  • johnkol
  • 427333 View
  • 256 Score
  • 11 Answer
  • Tags:   notepad++

15 Answered Questions

[SOLVED] Find CRLF in Notepad++

  • 2008-09-25 15:24:27
  • polara
  • 503235 View
  • 291 Score
  • 15 Answer
  • Tags:   regex notepad++

7 Answered Questions

[SOLVED] How To Auto-Format / Indent XML/HTML in Notepad++

15 Answered Questions

[SOLVED] Convert tabs to spaces in Notepad++

2 Answered Questions

1 Answered Questions

[SOLVED] Notepad++ Curly Bracket Auto-Outdenting

  • 2015-01-27 13:19:20
  • Shikayaru
  • 2658 View
  • 7 Score
  • 1 Answer
  • Tags:   notepad++

Sponsored Content