Where are search/replace expressions stored?
-
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.
-
Hello Rob-Stow,
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.Cheers
Claudia -
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.
-
Hello Rob,
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 thenbMaxFindHistoryFind ="10"parameter to something like
nbMaxFindHistoryFind ="1000"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.
Cheers
Claudia
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login