#replace first Tip with opening tags
s/\(VimTip\ 1:\)\(.*\)/\<Tip category="KVim"\>\
\<html\>\<center\>\2\<\/center\>\
\<pre\>/

#replace VimTip number by closing tags and with opening tags
s/\(VimTip\ \)\(.*\)\(:\)\(.*\)/\<\/pre\>\<\/tip\>\
\<\/html\>\
\<Tip category="KVim"\>\
\<html\>\<center\>\4\<\/center\>\
\<pre\>/

#add last close tag
$s/^$/\<\/html\>\<\/tip\>/

#add urls links :)
/tip_id/s|\(http://\)\(.*\)|\<A HREF=\"\1\2\"\>\1\2\<\/A\>\<BR\>|

#remove blank lines
/./,/^$/!d 
