How to disable FindHistory and FileEditViewHistory? auto-clear at exit?
-
As far as I know out NP++ does NOT provide an option to disable FindHistroy and FileEditViewHistory.
The only way is to manually (!) edit config.xml and delete corresponding lines.
This is surprising and disappointing.
I would call it a privacy issue.Are there any reasons to not let users disable recent file/search pattern lists?
Or at least to let them reduce it to only 1 item via GUI Settings?Or clear this items automatically at exit?
-
The real answer is to lock your PC when you leave it?
-
@Claudia-Svenson in Settings > Preferences, there is a Recent Files History section that allows you to customize the number of files in your history, and it looks like 0 is a valid option:
-
@Claudia-Svenson as for the Find history: I don’t see any settings in the Preferences window for this, but if you look in your
config.xml
file, you will see aFindHistory
tag with severalnbMaxFindHistory...
entries. On my setup, they are all set to10
, and I have 10Find
/Replace
entries in that section. So, in addition to deleting theFind
/Replace
entries, changing thenbMaxFindHistory..
values to0
might prevent NP++ from keeping a history going forward. -
(edit as there was a cross post)
@Claudia-Svenson, @mathlete2 has answered you for both the file history part and then the search history part. I had posted what’s below not realizing that mathlete2 was also answering the second part. Hopefully between what the two of us wrote you will know your to fix your Notepad++.
While Notepad++ is running the history for search/replace seems to be unlimited. However, Notepad++ saves the last 10 things searched for when it exits along with what was searched for.
You can configure how many search terms get saved by editing your
config.xml
file.- Exit from Notepad++
- Using Microsoft Notepad or an editor other than Notepad++ edit Notepad++'s
config.xml
file. - Near the very top of the config.xml file you will see a line with:
<FindHistory nbMaxFindHistoryPath="10" nbMaxFindHistoryFilter="10" nbMaxFindHistoryFind="10" nbMaxFindHistoryReplace="10" ...>
Change the number 10 to 0 (zero). You will need to change this in four spots on that line.
<FindHistory nbMaxFindHistoryPath="0" nbMaxFindHistoryFilter="0" nbMaxFindHistoryFind="0" nbMaxFindHistoryReplace="0" ...>
- Save the config.xml file and restart Notepad++.
Notepad++ will now be in a mode where the search history still has an unlimited length while Notepad++ is running but when you exit Notepad++ then the search history is not saved.
Notepad++ loads the config.xml file when it’s started and writes it back out when you exit Notepad++. That’s why in step 2 above you needed to use an editor other than Notepad++ to make the changes to config.xml.
Your config.xml file is normally at
%AppData%\Notepad++\config.xml
. If it is not their then post your Notepad++? / debug info
menu results here and someone will help you find the config.xml file. -
@mkupper said in How to disable FindHistory and FileEditViewHistory? auto-clear at exit?:
Notepad++ loads the config.xml file when it’s started and writes it back out when you exit Notepad++. That’s why in step 2 above you needed to use an editor other than Notepad++ to make the changes to config.xml.
The Configuration Files documentation also suggests using a portable copy of NP++ to do the editing, but another way to work around the overwrites is to:
- Copy
config.xml
to another directory. - Edit the copy with your usual NP++ installation.
- Close the session.
- Rename the original file to back it up.
- Copy over the edited file.
- Copy