Is there a way to clear results every time I do a new Find in Sublime Text (version 3 for this case)?
I dont want to have an history of what was searched before in the Find results tab.
22 Answers
Unfortunately, there doesn't seem to be a built in option to do so in the settings. The only method I know to make Sublime 3 "forget" the searched last strings is to erase them from a session file that is created after closing Sublime.
So, below is the method to make Sublime 3 "forget" the last searched strings from a previous session:
Go to the
Localfolder of Sublime, which can be found in the app data folder.on Windows:
%appdata%\Sublime Text 3\Local\On Linux:
~/.config/sublime-text-3/Local/On OSX:
~/Library/Application Support/Sublime Text 3/Local/
In this folder you will have a file called Session.sublime_session.
Edit the file with another editor (say Notepad++), and search for
find_historystring in it.Erase the quoted value that found between the brackets (this should be your last search string)
For example,
If you have the following shown in the Session.sublime_session file:
"find_state":
{ "case_sensitive": false, "find_history": [ "previously_searched_string" ],Then after the deletion it should look like this:
"find_state":
{ "case_sensitive": false, "find_history": [ ],You can also write a script that will do so automatically after closing Sublime.
Hope it helps.
1You can just close the Find results tab. When you reopen it (using shift+ctrl+f), it will be empty.
1