How to write and execute a replace script by menu/hotkey?
-
In many files I have to execute some replacements, e.g. simplified
replace (all occurrencies of) “aaa” by “bbb”
replace (all occurrencies of) “2018” by “2019”Therefore I would like to
- Write a replace script in Notepad++ which contains all these replacement instructions
- Load a file
- Execute the previously created replace script by (sub)menu or hotkey in NP++
How can I achieve this in detail?
Does NP++ offer this feature or is there a Plugin for that?Claudia
-
@Claudia-Svenson Find and replace in the entire catalog … not suitable?
-
Yes, thats perfect for a one-time replacement.
But I need this replacement with specific pattern frequently.
Having to enter it manually in the mentioned dialog every time is uncomfortable.
So I need a script handling for that. -
@Claudia-Svenson You need a magic wand … I don’t have one)))
-
You can record a macro for the replacement operation. See the Macro menu – fairly self-explanatory. The macro snapshot happens when one of the buttons is pressed (e.g. Replace, Replace All, etc).