-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regexp rename with a counter #31
Comments
Directly incrementing numeric values using regex in Notepad++ or MultiReplace isn't feasible. However, in MultiReplace, there's a workaround.You can predefine a list of replacements: start by replacing "button1" with "button2", then "button3" with "button4", and continue this pattern up to the maximum number of elements you anticipate having. Start with the highest numbers in the list to avoid overlap. For buttons without a number, simply replace button= with button1. For ease, you can prepare a CSV list in Excel and load it using the 'Load List' function in MultiReplace. I hope this helps! Important: Due to an issue found in the Replace function, please download the latest build here , you find it on the right side at the bottom, unzip MultiReplace-Release-x64.zip and copy it into your Notepad++ plugin directory. |
This won't work. I need to renumber the keys because of add/move/remove of them.
Is there a possibility to run a shell script using some input variables like column number, field value or something like that? |
Alright, I get what you're aiming for. Instead of implementing a direct counter, I gave it a go in MultiReplace with a different approach as an experimental feature, as I find it valuable to test its usefulness. Here's a step-by-step guide:
Download the release containing this feature here. I hope this helps! If you encounter any issues, don't hesitate to reach out. |
I'm planning to enhance the plugin by adding an 'Advanced Replacement' feature with support for counters, positions, line numbers, and dependencies in the next version. |
Thank you, it works! I have add the list files into mine project https://github.com/andry81/tacklebar |
Support of Counter is supported in next v. 2.0.0.7 coming in N++ 8.5.8 with option "Use Variables". |
Is there a way?
I need to rename key names in an ini file:
I want to insert a button (block of keys) between 1 and 2 and call the replacer to rename all keys using the counter variable:
The text was updated successfully, but these errors were encountered: