Where are search/replace expressions stored?
Rob Stow last edited by
There are a few search/replace operations I do almost every day and I get frustrated when Notepad++ removes those frequently used regular expressions from the “Find what” and “Replace With” drop-down lists. I have those expressions saved in a file so I can cut/paste them into the Search/Replace window but it would be much easier if I could just find a way to lock them permanently into those drop down lists.
My first step is to figure out where Notepad++ stores the contents of those drop down lists - it doesn’t seem to use xml files or any other text file in my %Appdata%\Notepad++ folder. I would try macros instead but Notepad++ was rumoured to store the macros in an XL file in that same folder … but the macros never get saved.
Claudia Frank last edited by
a good starting point is here.
Every configuration file is explained.
And the answer to the question would be shortcuts.xml and config.xml.
Where those files are located depends on how notepad++ was installed.
There are either in the APPDATA or in the notepad++ installation directory.
Rob Stow last edited by
Thanks, Claudia. Even though I had previously searched the registry, I was still hoping to hear that those were in the Windows registry - it would be so easy to make a little .reg file and have that reg file load before starting Notepad++. Too bad there’s not a way to just put a “lock” attribute on some of the things in config.xml so that NP++ will know to leave them alone.
I also tried putting my find/replace expressions in there own XML file but I can’t find a way to make NP++ load my XML file when it starts.
Claudia Frank last edited by Claudia Frank
I have thought about it for a while now but didn’t find
a solution which would be better than recording a macro.
But, of course, this would mean, that you need to record
each of your regexes and save it with a meaningful name.
And it is always the same regex called, no variation allowed.
The closest other solution I can think of is to modify the
parameter to something like
so it takes longer before it gets deleted but of course
it doesn’t make it more user friendly if you get a list of hundreds of regexes.
UPDATE: now that I have posted this - I think of something different - I will check and come back on this again.