Home Download Buy Blog Forum Support

Clear Find/ Search history

Clear Find/ Search history

Postby capnhud on Mon Feb 15, 2010 2:56 pm

Maybe I missing the obvious, but how do you clear the search history in Sublime text?
capnhud
 
Posts: 62
Joined: Thu Jan 14, 2010 11:57 am

Re: Clear Find/ Search history

Postby EJ12N on Mon Feb 15, 2010 7:31 pm

There's really no easy way (at least that I know of) but if you still want to do it here's how lol:

Sublime keeps all the history in this file:
%AppData%\Sublime Text\Options\Session.sublime-session
Under the "<history>" tag.
---
Do a search for findHistory and there you can just erase whatever is after that or whatever you want in that line.

Same goes for if you want to erase replaceHistory , consoleHistory, recentFiles and recentProjects
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Clear Find/ Search history

Postby capnhud on Tue Feb 16, 2010 9:36 am

Thank you. I don't think that was obvious, but thanks for pointing me in the correct direction. This seems very fascinating, but trying to figure how to configure something seems like a alot of trial and error and then you do not know if you are really correct. Like how do you make the vertical edge show?
capnhud
 
Posts: 62
Joined: Thu Jan 14, 2010 11:57 am

Re: Clear Find/ Search history

Postby EJ12N on Tue Feb 16, 2010 5:54 pm

capnhud wrote:Thank you. I don't think that was obvious, but thanks for pointing me in the correct direction. This seems very fascinating, but trying to figure how to configure something seems like a alot of trial and error and then you do not know if you are really correct. Like how do you make the vertical edge show?

Is called rulers in settings and it can be set on or off by filetype or globally on for all types
basically you do rulers 80 to display the vertical line at 80 characters...
Is this what you're talking about? If not please explain :)

As you can see by default in (top menu: preferences > default file preferences)
Code: Select all
# Columns in which to display vertical rulers, space separated
rulers

they are off by default.

by the way if you do rulers 20 30 40 50 60 it'll display all those in their respective columns, a feature I have yet to see in others editors.
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Clear Find/ Search history

Postby capnhud on Wed Feb 17, 2010 10:59 am

Is called rulers in settings and it can be set on or off by filetype or globally on for all types
basically you do rulers 80 to display the vertical line at 80 characters...


Yes this is what I am talking about. I had just said rulers true and set the wrapWidth, but I see I needed to put a number by rulers in order for it to work. Thank you once again EJ12N
capnhud
 
Posts: 62
Joined: Thu Jan 14, 2010 11:57 am

Re: Clear Find/ Search history

Postby EJ12N on Thu Feb 18, 2010 4:09 pm

Your welcome have fun subliming :)
EJ12N
 
Posts: 281
Joined: Tue Apr 21, 2009 5:23 pm

Re: Clear Find/ Search history

Postby GrantSP on Wed Sep 11, 2013 1:56 am

I'm using version 3 so the tags to look for are a bit different.

ie. file_history, find_in_files, find_state, incremental_find, auto_complete, etc.

However, the biggest difference, I believe, is these tags are located in two places in the same file.

Firstly they are nested under the "settings": tag.
They are also under the "windows": tag further down the file.

Not having checked a version 2 file I am not 100% sure they also aren't listed twice.

So you should probably delete the same lines from each section. Not sure what would result from mismatched histories.
Doesn't appear to have messed up my setup.

Edit:
Having tried this, at least for me, it doesn't work. With just Notepad, making sure ST3 was not loaded, I cleared all the entries for the 'find history'. The file was clear of any references to any of my recent searches. Upon starting ST3, ALL the previously deleted searches were back.

Clearly there are some other places on the system that store these details.

Edit 2:
I must have done something wrong before because it works as expected.
Clear the data in both sections and history is cleared.

I don't know why I thought it would be stored elsewhere, paranoid I guess. All those other programs writing stupid stuff to the registry. I should have realised that a cross-platform program as good as this one, would make things like this as easy as possible.

Edit 3:
As usual I spoke too soon. There of course more locations where your history is stored. Every project stores its own settings in a session file and everytime you load that project ALL the history is loaded back into the general session file again.

This is stupid! Separating the histories into their own projects is a good idea. Making those settings reload into the general settings is not.
Please make a simple command to clear the general history AND to clear project histories.
GrantSP
 
Posts: 39
Joined: Sat Aug 31, 2013 5:11 am


Return to General Discussion

Who is online

Users browsing this forum: demon386 and 28 guests