In Javascript, I can write like this:
const newStr = oldStr.replace(/([\d\.]+)(?=rem)/g, r => +r * 0.24);
const newStr = oldStr.replace(/([\d\.]+)(?=rem)/g, r => +r * 0.24);
What I could figure out is
*0.24
to all selections{ "keys": ["what_ever_keybinging_you_like"], "args": {"action": "evaluate_math_expression"}, "command": "run_emmet_action", "context": [{"key": "emmet_action_enabled.evaluate_math_expression"}]},
It would be good if someone has a better solution to this.
Is there a plugin which can do Python eval on selections with something like $1
as the placeholder?
If you’re a licensed user and using a Dev build, you can find numbers with a Find
operation. then use the new Arithmetic
command to perform calculations on it:
The Evaluate package may also be of assistance. The built in way is easier though (where available).
And finally, there is also InsertNums, which you would use with the pattern f|_*0.24
.