You can use your GCode editor, do a search and replace.
Search G00
Replace with G00 M9
Search G01
Replace with G01 M8 (or 7 for mist)
Works fine here in simulation.
You could also modify your post processor to do this automatically....if you know how. Can't help you there
Russ
guess you'd need to do the M8 (7) for G2 and 3 as well