Here are 2 :s commands. Work fine at command line or as part of a key mapping, but I cannot get them to run correctly in a vim script. I’ve used normal, execute, execute “normal…” and call normal on them. I’ve put the range with the s, and before normal, I’ve tried them with and without a : before the s. How should I write them within a .vim file?
:%s/<[\/]\?SPAN\|DIV\|OPTION[^>]*>//gi
:%s/<\(hr\|h[1-6]\|ul\|li\|p\|tt\|ol\|table\|tr\|td\|p\) [^>]\+/<\1/gi
You should just add them to a script. You don’t have to prefix them with anything in this case.