Notepad++ Setting for Disabling Auto

How do I stop Notepad++ from loading all files from the past session?

Every time I open a file I have 10 other open tabs with all my past files. I don't want that. When I hit the close button I expect the program to do what I want and close it. If I wanted to save a session I would use the built in session save feature. I don't want to hit the gray x 20 times when I am done so next time I don't have a bunch of files opening and taking up memory.

I tried the -nosession parameter and that works. But it only works if I use the shortcut. It won't work if I use the right-click edit method. How do I set Notepad++ to do this?


For versions 6.6+ you need to uncheck "Remember the current session for next launch" on Settings -> Preferences -> Backup .

这是6.6+

For older versions you need to uncheck "Remember the current session for next launch" on Settings -> Preferences .

就是这个


In Notepad++ v6.6 this setting is moved to the Backup tab of the Preferences menu.

在这里输入图像描述


My problem was that Notepad++ was crashing on a file I had previously opened; I was unable to open the application at all. This blog post discusses how to delete the data from the "Sessions" file so that Notepad++ will open without having any prior files open:

From the blog post:

Method 1 - edit session.xml

  • Open file session.xml in C:UsersUsernameAppDataRoamingNotepad++ or %APPDATA%Notepad++
  • Delete its contents and save it
  • Run Notepad++ , session.xml will get new content automatically
  • Method 2 - add the -nosession parameter to Notepad++ shortcut

  • Create a desktop shortcut referring to your Notepad++ program, eg C:Program FilesNotepad++notepad++.exe
  • Right click on this shortcut
  • In the "Target" field add the -nosession parameter so the target field looks exaxtly like (apostrophes included too): "C:Program FilesNotepad++notepad++.exe" -nosession
  • Save and run Notepad++ from this shortcut icon with no recent files
  • Note: This is not a permanent setting, this simply deletes the prior session's information / opened files and starts over.

    Alternatively, if you know the file which is causing notepad++ to hang, you can simply rename the file and open notepad++. This will solve the problem.

    I hadn't seen this solution listed when I was googling my problem so I wanted to add it here!

    链接地址: http://www.djcxy.com/p/68842.html

    上一篇: 用户特定设置是否需要appname.exe.config?

    下一篇: 记事本++设置禁用自动