# # Vi/Ex/Sed commands to uppercase all HTML tags # # Yes I know this is not common practise, but it used to be! # I found using capitials makes for clearer syntax when directly # editing HTML files. # :%s/<\(\/*\)html>/<\1HTML>/g :%s/<\(\/*\)head>/<\1HEAD>/g :%s/<\(\/*\)body\([ >]\)/<\1BODY\2/g :%s/<\(\/*\)address>/<\1ADDRESS>/g :%s/<\(\/*\)title>/<\1TITLE>/g :%s/<\(\/*\)meta /<\1META /g :%s/<\(\/*\)center>/<\1CENTER>/g :%s/<\(\/*\)h\([1-7]\)\([ >]\)/<\1H\2\3/g :%s/<\(\/*\)ul\([ >]\)/<\1UL\2/g :%s/<\(\/*\)ol>/<\1OL>/g :%s/<\(\/*\)li>/<\1LI>/g :%s/<\(\/*\)dl>/<\1DL>/g :%s/<\(\/*\)dt>/<\1DT>/g :%s/<\(\/*\)dd>/<\1DD>/g :%s/<\(\/*\)table\([ >]\)/<\1TABLE\2/g :%s/<\(\/*\)tr\([ >]\)/<\1TR\2/ :%s/<\(\/*\)th\([ >]\)/<\1TH\2/ :%s/<\(\/*\)td\([ >]\)/<\1TD\2/ :%s/<\(\/*\)p\([ >]\)/<\1P\2/g :%s/]\)/]\)/]\)/<\1A\2/g :%s/]\)/<\1FONT\2/g :%s/<\(\/*\)strong>/<\1STRONG>/g :%s/<\(\/*\)code>/<\1CODE>/g :%s/<\(\/*\)cite>/<\1CITE>/g :%s/<\(\/*\)blink>/<\1BLINK>/g :%s/<\(\/*\)em>/<\1EM>/g :%s/<\(\/*\)tt>/<\1TT>/g :%s/<\(\/*\)i>/<\1I>/g :%s/<\(\/*\)[buU]>/<\1B>/g :%s/<\(\/*\)sup>/<\1SUP>/g :%s/<\(\/*\)[Pp]re>/<\1PRE>/g :%s//<\/A>/g :%s/<\/A>/\ <\/A>/g :%s/ align=/ ALIGN=/g :%s/ src=/ SRC=/g :%s/ width=/ WIDTH=/g :%s/ height=/ HEIGHT=/g :%s/ alt=/ ALT=/g :%s/ border=/ BORDER=/g :%s/ vspace=/ VSPACE=/g :%s/ hspace=/ HSPACE=/g :%s/ valign=/ VALIGN=/g :%s/ type=/ TYPE=/g :%s/ size=/ SIZE=/g :%s/ color=/ COLOR=/g :%s/ background=/ BACKGROUND=/g :%s/ text=/ TEXT=/g :%s/ bgcolor=/ BGCOLOR=/g :%s/ link=/ LINK=/g :%s/ vlink=/ VLINK=/g :%s/ alink=/ AVLINK=/g :%s/ cellspacing=/ CELLSPACING=/g :%s/ cellpadding=/ CELLPADDING=/g # # Operator info for myself # Operator: Anthony Thyssen, <anthony@cit.gu.edu.au>

# # Substitute PRE Characters... # :'a,'b s/\&/\&/g :'a,'b s//\>/g # # Other Substitutions (once off fixes) # # Quote the Src Argument #:%s/SRC= *\([^"][^ ]*\)/SRC="\1"/ #:%s/^ */<\1BLOCKQUOTE>/ #:%s/gif">/gif">/ #:%s/htm">/html">/ # :'a,'b s/

/

  • /