In my experience, such things most often occur during editing, and you may have a search already \textcolor{green}{ .
In this scenario :global usually my weapon of choice:
:g//norm d%diBvaBp
diBvaBp: diB (remove the internal block), vaB (select block), p (put) sub>
If you have surround.vim installed (recommended!), You can remove a pair of curly braces by simply doing dsB (delete around {})
:g//norm d%dsB
Of course you can combine it as
:g/\\textcolor{green}{/norm d%dsB
I just noted a potential problem when the target patterns do not start at the beginning of the line. The easiest way to get around this is
:g//norm nNd%diBvaBp
A more attractive way (possibly less efficient) would be to use a macro:
/\\textcolor{green}{ gg qqd%diBvaBpnq
Following something like 100@q to repeat the macro
source share