Not a direct answer, but you can use something like: rubydo, which will execute some ruby script on a line of code. Combining this with gsub in ruby should give you the ability to do something in every match. Of course, you will need to do this with a ruby code, which may not give you access to everything that you might need without the hassle (for example, adding registers would be annoying)
:[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
[range], with $_ being set to the text of each line in
turn, without a trailing <EOL>. Setting $_ will change
the text, but note that it is not possible to add or
delete lines using this command.
The default for [range] is the whole file: "1,$".
source
share