Kate: How to delete Search History?

When i open Kate (Text Editor), i press strg+f and i can scroll through the Search History with my Mousewheel and even with a new Session and max Privacy Settings, i have no idea to clear the Search History.

Where are this stuff saved? How can i clear this Index?

I cannot find a way to delete in the app, but the data is stored in katerc
You’ll find here:

Search History=words,you,dont,want,are,here,remove,them,then,save,the,file

Next time you search, you will not see them.




@jrichard326 @ydar
Thank you both, for the help. I think its better not to open the Katerc file with Kate to Edit a config file while the Application is running.

Could you guys help me out with a script to replace the configfile?
Maybe a Backup Replacement, like Katerc-backup to overwrite Katerc? I have no clue what the best way to use a script for this.

Edit: Since i don’t want to make any adjustment to Kate… maybe its the best way to use write protection after Editing Katerc?

In this case, i don’t have to use a script at all.

If you wanted to delete the search history with a shell command, something like this should work:

sed -i s/"^Search History=.*"/"Search History="/g ~/.config/katerc

This should delete everything in the history. You could put this in a script that was run periodically, at shutdown, startup, with a key combination etc. It would probably be wise to backup your katerc file before running this, at least until you were sure it was working as you wanted.

Also, does the option Maximum Search History= in katerc work if you set to a lower (or 0) value?

1 Like

Don’t worry about it. It’s really not different than when other software we’re using is updated, like the kernel, kwin, or Plasma. It’s loaded into memory so usually the changes will be applied when you restart the application.

1 Like

Yeah Maximum Search History Size=0 works, goodjob.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.