Comments (6)
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.
from notepadpp-multireplace.
Thank you, it works!
I have add the list files into mine project https://github.com/andry81/tacklebar
from notepadpp-multireplace.
Support of Counter is supported in next v. 2.0.0.7 coming in N++ 8.5.8 with option "Use Variables".
from notepadpp-multireplace.
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.
from notepadpp-multireplace.
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.
This won't work. I need to renumber the keys because of add/move/remove of them.
Enables scripted text replacements through bash script export.
Is there a possibility to run a shell script using some input variables like column number, field value or something like that?
from notepadpp-multireplace.
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:
-
Remove Numeric Suffixes:
Make sure the option Regular Expression is checked.Find Replace W C N E R (Button|cmd)\d+ $1 X This step is to clear all numbers after "Button" and "cmd". This operation should be done without activating the experimental feature.
-
Prepare Your Replacement List:
Make sure the option "Match whole word only" is checked.Find Replace W C N E R Button Button1 X X Button Button2 X X Button Button3 X X cmd cmd1 X X cmd cmd2 X X cmd cmd3 X X ... (continue this pattern up to your expected maximum count)
-
Activate Experimental Feature:
Before running the replacement list, activate an experimental feature. When active, each entry in the list will replace only one occurrence in the text, preventing overwriting already assigned numbers.- Select any entry in the list
- Press
F11
. (works only if an entry is selcted)
A window will pop up. This feature remains active until you pressF11
again or restart N++.
-
Run Your Replacement List:
With the experimental feature activated and your replacement list ready, initiate the list. This will sequentially renumber all your "Button" and "cmd" entries.For efficient operations, you can activate or deactivate multiple entries in the list by selecting them and pressing 'Space'. Just be cautious about when the experimental feature is activated, as there isn't a visual indication yet.
Download the release containing this feature here.
I hope this helps!
If you encounter any issues, don't hesitate to reach out.
from notepadpp-multireplace.
Related Issues (20)
- 32-bit build failing due to sign mismatch warning and treat warnings as errors HOT 1
- The vs.proj/Win32 directory needs to be added to .gitignore
- Version is misreported HOT 1
- Make Escape key close smarter
- 32-bit build warning as error signed mismatch (again)
- 32-bit warning as error again
- "export to Bash" HOT 2
- all open documents HOT 2
- The newer versions can't not run on NPP v8.5.7 x64 HOT 2
- Ability to translate the plugin HOT 8
- Replace using Capture Variables HOT 1
- Replace All and Selection HOT 2
- Execution halted HOT 2
- Parentheses incorrect replacement in regexp expression HOT 3
- Dots incorrect replacement in regexp expressions HOT 17
- Capture variables does not reset HOT 11
- Regex Replace All and Selection HOT 2
- Issues when text has special character like colon : HOT 4
- Nil value breaks following capture variables HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notepadpp-multireplace.