str2htmlentity Vim script to convert from HTML String to Entity. Install Put this file into $HOME/.vim/plugin directory. Add these settings into .vimrc file. vmap <silent> sx :Str2HtmlEntity<cr> vmap <silent> sr :Entity2HtmlString<cr>