pseudo html-escape with vim

http://www.vim.org/tips/tip.php?tip_id=1005

in .vimrc

:function HtmlEscape()
silent s/&/\&/eg
silent s/ silent s/>/\>/eg
:endfunction

:function HtmlUnEscape()
silent s/</ silent s/>/>/eg
silent s/&/\&/eg
:endfunction

vmap :call HtmlEscape()
vmap :call HtmlUnEscape()

Then control-h/control-u to escape/unescape the simplest of entities that you’ve selected visually