如何阻止notepad++从过去的会话加载所有文件?

每次我打开一个文件,我都有10个其他打开的标签,上面都是我过去的文件。我不想那样。当我按下关闭按钮时,我希望程序做我想做的事情并关闭它。如果我想保存一个会话,我会使用内置的会话保存功能。当我完成时,我不想点击灰色x 20次,这样下次我就不会有一堆文件打开并占用内存了。

我尝试了-nosession参数,这是有效的。但只有我用快捷键才能用。如果我使用右键编辑方法,它将不起作用。我如何设置notepad++来做到这一点?


使用菜单项设置>首选项。

在结果对话框的MISC选项卡上,取消选中“为下次启动记住当前会话”。

对于版本6.6+,您需要取消“记住当前会话为下次启动”的设置->首选项->备份。

对于旧版本,您需要取消选中“为下次启动记住当前会话”。 on Settings ->首选项。

转到:设置>首选项>备份>和取消勾选下次启动时记住当前会话

在旧版本(6.5-)中,此选项位于设置>首选项> MISC。

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.

在notepad++ v6.6中,此设置被移动到首选项菜单的备份选项卡。

我的问题是notepad++在我之前打开的文件上崩溃了;我根本无法打开应用程序。这篇博文讨论了如何从“Sessions”文件中删除数据,这样notepad++将在没有任何先前文件打开的情况下打开:

文章中写道:

Method 1 - edit session.xml Open file session.xml in C:\Users\Username\AppData\Roaming\Notepad++ 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, e.g. C:\Program Files\Notepad++\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 Files\Notepad++\notepad++.exe" -nosession Save and run Notepad++ from this shortcut icon with no recent files

注意:这不是一个永久设置,这只是删除前一个会话的信息/打开的文件,然后重新开始。

或者,如果你知道导致notepad++挂起的文件,你可以简单地重命名文件并打开notepad++。这样问题就解决了。

当我在谷歌上搜索我的问题时,我还没有看到这个解决方案,所以我想在这里添加它!

我读答案。然后我注意到复选框已经被取消勾选,但它仍然总是重新加载文件。这是6.3.2版本的设置->首选项->MISC->“为下次启动记住当前会话”复选框。下面的方法解决了这个问题:

1. Check the check box.
2. Exit the program.
3. Start the program again.
4. Uncheck the checkbox.