Notepad++ Setting for Disabling Auto-open Previous Files

后端 未结 7 1049
谎友^
谎友^ 2020-12-12 14:24

\"enter

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

相关标签:
7条回答
  • 2020-12-12 14:31

    Go to: Settings > Preferences > Backup > and Uncheck Remember current session for next launch

    In older versions (6.5-), this option is located on Settings > Preferences > MISC.

    0 讨论(0)
  • 2020-12-12 14:39

    Ok, I had a problem with Notepad++ not remembering that I had chosen not the "Remember Current Session". I tried hacking the config file, but that didn't work. Then I found out that there is a secret config file in your C:\Users\myuseraccount\AppData\Roaming\Notepad++ directory (Windows 7 x64). Mine was empty, meaning who know where the config was really coming from, but I copied over the file with the one in C:\Program Files (x86)\Notepad++ and now everything works just like you would expect it to.

    0 讨论(0)
  • 2020-12-12 14:47

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

    enter image description here

    0 讨论(0)
  • 2020-12-12 14:49

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

    this is it in 6.6+

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

    this is it

    0 讨论(0)
  • 2020-12-12 14:50

    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

    1. Open file session.xml in C:\Users\Username\AppData\Roaming\Notepad++ or %APPDATA%\Notepad++
    2. Delete its contents and save it
    3. Run Notepad++ , session.xml will get new content automatically

    Method 2 - add the -nosession parameter to Notepad++ shortcut

    1. Create a desktop shortcut referring to your Notepad++ program, e.g. C:\Program Files\Notepad++\notepad++.exe
    2. Right click on this shortcut
    3. In the "Target" field add the -nosession parameter so the target field looks exaxtly like (apostrophes included too): "C:\Program Files\Notepad++\notepad++.exe" -nosession
    4. 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!

    0 讨论(0)
  • 2020-12-12 14:53

    Use the menu item Settings>Preferences.

    On the MISC tab of the resulting dialog, uncheck "Remember current session for next launch."

    0 讨论(0)
提交回复
热议问题